wikimedia/pywikibot

View on GitHub
tests/timestripper_tests.py

Summary

Maintainability
A
1 hr
Test Coverage

Function test_last_match_and_replace has 37 lines of code (exceeds 30 allowed). Consider refactoring.
Open

    def test_last_match_and_replace(self):
        """Test that pattern matches and removes items correctly."""
        txt_with_one_match = 'this string has 3000, 1999 and 3000 in it'
        txt_with_two_match = 'this string has 1998, 1999 and 3000 in it'
        txt_with_no_match = 'this string has no match'
Severity: Minor
Found in tests/timestripper_tests.py - About 1 hr to fix

    XXX found
    Open

            self.assertEqual('this string has XXX, @@@@ and @@@@@@@ in it', txt)
    Severity: Minor
    Found in tests/timestripper_tests.py by fixme

    XXX found
    Open

            txt_with_one_match = 'this string has XXX, YYY and février in it'
    Severity: Minor
    Found in tests/timestripper_tests.py by fixme

    XXX found
    Open

            self.assertEqual('this string has XXX, YYY and @@@@@@@ in it', txt)
    Severity: Minor
    Found in tests/timestripper_tests.py by fixme

    XXX found
    Open

            txt_with_two_match = 'this string has XXX, mars and février in it'
    Severity: Minor
    Found in tests/timestripper_tests.py by fixme

    There are no issues that match your filters.

    Category
    Status