tests.cosmetic_changes_tests module#
Test cosmetic_changes module.
- class tests.cosmetic_changes_tests.TestCosmeticChanges(*args, **kwargs)[source]#
Bases:
TestCase
Test cosmetic changes methods.
- abstract_class = True#
- code = 'de'#
- family = 'wikipedia'#
- class tests.cosmetic_changes_tests.TestCosmeticChangesISBN(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,TestCosmeticChanges
Test CosmeticChanges ISBN fix.
- ISBN_CHECKSUMERROR_RE = 'ISBN checksum of [0-9]+ is incorrect'#
- ISBN_DIGITERROR_RE = 'ISBN [0-9]+ is not [0-9]+ digits long'#
- ISBN_INVALIDCHARERROR_RE = 'ISBN [0-9a-zA-Z]+ contains invalid characters'#
- ISBN_INVALIDCHECKERROR_RE = 'checksum or check digit is invalid'#
- ISBN_INVALIDERROR_RE = 'Invalid ISBN found'#
- ISBN_INVALIDLENGTHERROR_RE = 'The number has an invalid length'#
- abstract_class = False#
- code = 'de'#
- dry = True#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:de': {'code': 'de', 'family': 'wikipedia'}}#
- class tests.cosmetic_changes_tests.TestCosmeticChangesPersian(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCosmeticChanges
Test cosmetic changes methods in Persian Wikipedia.
- abstract_class = False#
- code = 'fa'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:fa': {'code': 'fa', 'family': 'wikipedia'}}#
- class tests.cosmetic_changes_tests.TestDryCosmeticChanges(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,TestCosmeticChanges
Test cosmetic_changes not requiring a live wiki.
- abstract_class = False#
- code = 'de'#
- dry = True#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:de': {'code': 'de', 'family': 'wikipedia'}}#
- test_removeNonBreakingSpaceBeforePercent()[source]#
Test removeNonBreakingSpaceBeforePercent method.
Test standardizePageFooter method.
- class tests.cosmetic_changes_tests.TestDryFixSyntaxSave(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,TestCosmeticChanges
Test fixSyntaxSave not requiring a live wiki.
- abstract_class = False#
- code = 'de'#
- dry = True#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:de': {'code': 'de', 'family': 'wikipedia'}}#
- class tests.cosmetic_changes_tests.TestLiveCosmeticChanges(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCosmeticChanges
Test cosmetic_changes requiring a live wiki.
- abstract_class = False#
- code = 'de'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:de': {'code': 'de', 'family': 'wikipedia'}}#
- test_cleanup_links()[source]#
Test cleanUpLinks method.
This method fails for the given samples from library. Either the method has to be changed or the examples must be fixed.
- test_remove_empty_sections_interlanguage_links()[source]#
Test removeEmptySections with edge cases of language links.
- test_remove_empty_sections_with_heading_comments()[source]#
Test removeEmptySections with comments in the section headings.