Last modified: 2014-11-15 06:48:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70847, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68847 - Testsuite initialisation fails on Windows when pywin32 isnt installed
Testsuite initialisation fails on Windows when pywin32 isnt installed
Status: NEW
Product: Pywikibot
Classification: Unclassified
tests (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-30 09:30 UTC by John Mark Vandenberg
Modified: 2014-11-15 06:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-07-30 09:30:06 UTC
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'

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links