tests.tools_formatter_tests module#

Tests for the pywikibot.tools.formatter module.

class tests.tools_formatter_tests.TestColorFormat(*args, **kwargs)[source]#

Bases: DisableSiteMixin, DeprecationTestCase

Test color_format function in bot module.

class DummyUnicode[source]#

Bases: object

Dummy class that __str__ returns a non-ASCII Unicode value.

abstract_class = False#
assert_format(format_string, expected, *args, **kwargs)[source]#

Assert that color_format returns the expected string and type.

test_bytes_format()[source]#

Test that using bytes is not allowed.

test_color_kwargs()[source]#

Test with a color as keyword argument.

test_colors()[source]#

Test with colors in template string.

test_marker()[source]#

Test that the 03 marker is only allowed in front of colors.

test_no_colors()[source]#

Test without colors in template string.

test_non_ascii()[source]#

Test non-ASCII replacements.

test_variant_colors()[source]#

Test variant colors with {color} parameter.

class tests.tools_formatter_tests.TestListOutputter(*args, **kwargs)[source]#

Bases: DisableSiteMixin, TestCase

Test ListFormatter class.

abstract_class = False#
test_SequenceOutputter()[source]#

Test format method.