tests.pwb_tests module#

Test pwb.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.

Note

site must be explicitly set for pwb tests. This test does not require network access, because tests/pwb/print_locals.py does not use handle_args, etc. so version.py doesn’t talk on the network.

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.