testsuite in -0.4, FAILED (errors=12 or 15)

Bug #1260573 reported by IAN DELANEY on 2013-12-13
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
testscenarios
Undecided
Unassigned

Bug Description

Well, the README is fairly extensive. The setup.py just says
" install_requires = [
        'testtools',
". I used nosetests to run them.

testscenarios-0.4 $ PYTHONPATH=. nosetests lib/testscenarios/tests/

yields

Ran 28 tests in 0.019s

FAILED (errors=12)

with lots of

_StringException: Traceback (most recent call last):
  File "/mnt/gen2/TmpDir/portage/dev-python/testscenarios-0.4/work/testscenarios-0.4/lib/testscenarios/tests/test_testcase.py", line 63, in test_with_two_scenarios_two_run
    class ReferenceTest(self.Implementation):
  File "/mnt/gen2/TmpDir/portage/dev-python/testscenarios-0.4/work/testscenarios-0.4/lib/testscenarios/tests/test_testcase.py", line 31, in Implementation
    if isinstance(self.impl, tuple):
AttributeError: 'TestTestWithScenarios' object has no attribute 'impl'

and

ERROR: testscenarios.tests.load_tests
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
TypeError: load_tests() takes exactly 3 arguments (0 given)

======================================================================
ERROR: Adapter test runner load hooks to call generate_scenarios.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib64/python2.7/site-packages/nose/util.py", line 613, in newfunc
    return func(*arg, **kw)
  File "/mnt/gen2/TmpDir/portage/dev-python/testscenarios-0.4/work/testscenarios-0.4/lib/testscenarios/scenarios.py", line 106, in load_tests_apply_scenarios
    if getattr(params[0], 'suiteClass', None) is not None:
IndexError: tuple index out of range

testscenarios-0.4 $ PYTHONPATH=. python lib/testscenarios/tests/{the test_*.py files)

yields a blank.

py.test doesn't work

So I presume here this is a case of assumed knowledge, again.
You assume I know how the testsuite is run. I tell you nosetests works for 99 out of a hundred so I ran it with nosetests and it yields as above with

PYTHONPATH=. nosetests lib/testscenarios/tests/

and

FAILED (errors=15)

with

testscenarios-0.4 $ PYTHONPATH=. nosetests .

OR

does your testsuite in fact require a major overhaul? Do you wish for a comprehensive log output? Is above sufficient?

Matthew Thode (prometheanfire) wrote :

 PYTHONPATH=./lib ${EPYTHON} -m testtools.run testscenarios.test_suite

fixed

Robert Collins (lifeless) wrote :

Hi thanks for the bug report. The issue is that nose isn't unittest API compatible. I'd welcome tasteful patches to work with nose however.

Changed in testscenarios:
status: New → Invalid
IAN DELANEY (johneed) wrote :

as an aside, master prometh went straight to the Makefile and found the make check entry, which I totally missed, looking for a setup.py test. Oh well, I lived and learnt that lesson one more time

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers