Running on Windows, make sure you don't have python-stdnum installed.
$ python -m unittest tests.isbn_tests.TestCosmeticChangesISBN.test_invalid_isbn tests: max_retries reduced from 5 to 1 WARNING: ...\Python36\lib\importlib\_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) WARNING: ...\Python36\lib\site-packages\bs4\builder\_lxml.py:250: DeprecationWarning: inspect.get argspec() is deprecated, use inspect.signature() or inspect.getfullargspec() self.parser.feed(markup) WARNING: ...\pywikibot-core\pywikibot\cosmetic_changes.py:154: ImportWarning: package stdnum.isbn not foun d; using scripts.isbn ImportWarning) F ====================================================================== FAIL: test_invalid_isbn (tests.isbn_tests.TestCosmeticChangesISBN) Test that it'll fail when the ISBN is invalid. ---------------------------------------------------------------------- scripts.isbn.InvalidIsbnException: Invalid ISBN found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "...\pywikibot-core\tests\isbn_tests.py", line 79, in test_invalid_isbn cc.fix_ISBN, 'ISBN 0975229LOL') AssertionError: "The ISBN ([A-Z0-9]*) is not (10|13) digits long|The number has an invalid length" does not match "Invalid ISBN found" ---------------------------------------------------------------------- Ran 1 test in 0.003s FAILED (failures=1)