https://bugzilla.wikimedia.org/show_bug.cgi?id=68847
Bug ID: 68847 Summary: Testsuite initialisation fails on Windows when pywin32 isnt installed Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: tests Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
Under python 2.7.8, the default test loader for 'tests' tries to instantiate all files called '*_tests.py', and fails to instantiate the module 'ui_tests' when pywin32 is not installed.
python setup.py test
running test running egg_info writing requirements to pywikibot.egg-info\requires.txt writing pywikibot.egg-info\PKG-INFO writing top-level names to pywikibot.egg-info\top_level.txt writing dependency_links to pywikibot.egg-info\dependency_links.txt reading manifest file 'pywikibot.egg-info\SOURCES.txt' writing manifest file 'pywikibot.egg-info\SOURCES.txt' running build_ext WARNING: Running on Windows and transliteration_target is not set. Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Wi ndows Traceback (most recent call last): File "...\setup.py", line 94, in <module> use_2to3=False File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "build\bdist.win-amd64\egg\setuptools\command\test.py", line 138, in run File "build\bdist.win-amd64\egg\setuptools\command\test.py", line 118, in with _project_on_sys_path File "build\bdist.win-amd64\egg\setuptools\command\test.py", line 164, in run_ tests File "C:\Python27\lib\unittest\main.py", line 94, in __init__ self.parseArgs(argv) File "C:\Python27\lib\unittest\main.py", line 149, in parseArgs self.createTests() File "C:\Python27\lib\unittest\main.py", line 158, in createTests self.module) File "C:\Python27\lib\unittest\loader.py", line 128, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "C:\Python27\lib\unittest\loader.py", line 103, in loadTestsFromName return self.loadTestsFromModule(obj) File "build\bdist.win-amd64\egg\setuptools\command\test.py", line 35, in loadT estsFromModule File "C:\Python27\lib\unittest\loader.py", line 100, in loadTestsFromName parent, obj = obj, getattr(obj, part) AttributeError: 'module' object has no attribute 'ui_tests'
https://bugzilla.wikimedia.org/show_bug.cgi?id=68847
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |core (2.0)
pywikipedia-bugs@lists.wikimedia.org