Hello,
when preparing the taurus 4.0.1 debian package
I get this error if I activate the tests during the build
I: pybuild base:184: python2.7 setup.py test
running test
running egg_info
writing lib/taurus.egg-info/PKG-INFO
writing top-level names to lib/taurus.egg-info/top_level.txt
writing dependency_links to lib/taurus.egg-info/dependency_links.txt
writing entry points to lib/taurus.egg-info/entry_points.txt
reading manifest file 'lib/taurus.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lib/taurus.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 161, in <module>
test_suite='taurus.test.testsuite.get_suite',
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 172, in run
self.run_tests()
File "/usr/lib/python2.7/dist-packages/setuptools/command/test.py", line 193, in run_tests
testRunner=self._resolve_as_ep(self.test_runner),
File "/usr/lib/python2.7/unittest/main.py", line 94, in init
self.parseArgs(argv)
File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'get_suite'
E: pybuild pybuild:276: test: plugin distutils failed with: exit code=1: python2.7 setup.py test
I understand that the test should fail for now,but I think thaht this is not the right way to fail ;)
Cheers
Frederic
Hi Fred,
as usually, you are spot-on ... we do not yet support
python setup.py test
.For now, if you want to run tests, run
taurustestsuite
(but note that you may need to provide a suitable environment, such as that in https://hub.docker.com/r/cpascual/taurus-test/ if you want all tests to succeed.Note that
taurustestsuite
allows you use patterns to exclude tests. This may be interesting for the debian build (since you could exclude those tests that require special setup)Cheers,
I created a PR that fix the bug.
PR merged. Thanks!