tests.pwb_tests module#

Test pwb.py.

If pwb.py does not load python files as expected, more tests from coverage should be added locally. https://bitbucket.org/ned/coveragepy/src/default/tests/test_execfile.py

class tests.pwb_tests.TestPwb(*args, **kwargs)[source]#

Bases: DisableSiteMixin, PwbTestCase

Test pwb.py functionality.

This is registered as a Site test because it will not run without a user config file.

abstract_class = False#
pwb = True#
test_argv()[source]#

Test argv of pywikibot.

Make sure that argv passed to the script is not contaminated by global options given to pwb.py wrapper.

test_env()[source]#

Test external environment of pywikibot.

Make sure the environment is not contaminated, and is the same as the environment we get when directly running a script.

test_locals()[source]#

Test internal environment of pywikibot.

Make sure the environment is not contaminated, and is the same as the environment we get when directly running a script.

test_one_similar_script()[source]#

Test shell.py script call which gives one similar result.

test_script_found()[source]#

Test pwb.py script call which is found.

test_script_not_found()[source]#

Test pwbot.py script call which is not found.

test_similar_scripts_found()[source]#

Test script call which gives multiple similar results.

test_unicode()[source]#

Test printing unicode in pywikibot.