1. Michael Bayer
  2. sqlalchemy
  3. Issues

Issues

Issue #1777 resolved

setuptools auto-test not working

Anonymous created an issue

as per README.unittest documentation, tried to run python setup.py test, which fails as follows:

D:\Downloads\SQLAlchemy-0.6beta3>python setup.py test
running test
running egg_info
writing lib\SQLAlchemy.egg-info\PKG-INFO
writing top-level names to lib\SQLAlchemy.egg-info\top_level.txt
writing dependency_links to lib\SQLAlchemy.egg-info\dependency_links.txt
writing entry points to lib\SQLAlchemy.egg-info\entry_points.txt
reading manifest file 'lib\SQLAlchemy.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile' under directory 'doc'
no previously-included directories found matching 'doc\build\output'
writing manifest file 'lib\SQLAlchemy.egg-info\SOURCES.txt'
running build_ext
c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\plugins\manager.py:385:
 RuntimeWarning: Unable to load plugin sqlalchemy = sqlalchemy.test.noseplugin:N
oseSQLAlchemy: cannot import name Alias
  RuntimeWarning)
Traceback (most recent call last):
  File "setup.py", line 133, in <module>
    **extra
  File "c:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "c:\Python26\lib\site-packages\setuptools\command\test.py", line 121, in
run
    self.with_project_on_sys_path(self.run_tests)
  File "c:\Python26\lib\site-packages\setuptools\command\test.py", line 101, in
with_project_on_sys_path
    func()
  File "c:\Python26\lib\site-packages\setuptools\command\test.py", line 130, in
run_tests
    testLoader = loader_class()
  File "c:\Python26\lib\unittest.py", line 816, in __init__
    self.parseArgs(argv)
  File "c:\Python26\lib\unittest.py", line 843, in parseArgs
    self.createTests()
  File "c:\Python26\lib\unittest.py", line 849, in createTests
    self.module)
  File "c:\Python26\lib\unittest.py", line 613, in loadTestsFromNames
    suites = [module) for name in names](self.loadTestsFromName(name,)
  File "c:\Python26\lib\unittest.py", line 598, in loadTestsFromName
    test = obj()
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\core.py", line
310, in collector
    conf.configure(argv=['collector']('collector'))
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\config.py", lin
e 273, in configure
    options, args = self._parseArgs(argv, cfg_files)
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\config.py", lin
e 261, in _parseArgs
    return parser.parseArgsAndConfigFiles(argv[1:](1:), cfg_files)
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\config.py", lin
e 132, in parseArgsAndConfigFiles
    self._applyConfigurationToValues(self._parser, config, values)
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\config.py", lin
e 118, in _applyConfigurationToValues
    name=name, filename=filename)
  File "c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\config.py", lin
e 258, in warn_sometimes
    raise ConfigError(msg)
nose.config.ConfigError: Error reading config file 'setup.cfg': no such option 'with-sqlalchemy'

nose is definitely installed. tested on windows 7 64, both as normal user and as administrator.

Comments (4)

  1. Michael Bayer repo owner

    there's an import error occurring:

    c:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\plugins\manager.py:385:
     RuntimeWarning: Unable to load plugin sqlalchemy = sqlalchemy.test.noseplugin:N
    oseSQLAlchemy: cannot import name Alias
      RuntimeWarning)
    

    I just fixed a syntax warning that was occuring in 38d6c31a29b28577aabb5ae2e641cf95a3cdbc7a, but that doesn't seem like the same issue. Can't reproduce on a mac or linux machine. Someone would need to track down where the offending "Alias" import is when it runs on windows.

  2. Michael Bayer repo owner

    I have tried extensively on a vmware setup, using both windows-native python as well as cygwin python, I have tried 0.6beta3 straight from pypi as well as from mercurial tag, can't reproduce this problem. the only place that import could be occuring is in lib/sqlalchemy/sql/__init__.py so if you can pdb a bit that might shed some light, otherwise there's not much we can do here.

  3. Log in to comment