Skip to content

7d62575 causes a regression in testscenarios #583

@s-t-e-v-e-n-k

Description

@s-t-e-v-e-n-k

While building testscenarios 0.5.0 with testing-cabal/testscenarios#17 merged, I'm getting the following test errors:

[    6s] + python3.11 -m testtools.run testscenarios.test_suite
[    6s] Tests running...
[    6s] .s.s.s.s.s.s.s.s.s.s..........EE....======================================================================
[    6s] ERROR: testscenarios.tests.test_scenarios.TestLoadTests.test_load_tests_apply_scenarios
[    6s] ----------------------------------------------------------------------
[    6s] Traceback (most recent call last):
[    6s]   File "/home/abuild/rpmbuild/BUILD/python-testscenarios-test-0.5.0-build/testscenarios-0.5.0/testscenarios/tests/test_scenarios.py", line 189, in test_load_tests_apply_scenarios
[    6s]     suite = load_tests_apply_scenarios(
[    6s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[    6s]   File "/home/abuild/rpmbuild/BUILD/python-testscenarios-test-0.5.0-build/testscenarios-0.5.0/testscenarios/scenarios.py", line 111, in load_tests_apply_scenarios
[    6s]     result.addTests(generate_scenarios(standard_tests))
[    6s]   File "/usr/lib64/python3.11/unittest/suite.py", line 58, in addTests
[    6s]     self.addTest(test)
[    6s]   File "/usr/lib64/python3.11/unittest/suite.py", line 47, in addTest
[    6s]     raise TypeError("{} is not callable".format(repr(test)))
[    6s] TypeError: [<testscenarios.tests.test_scenarios.TestLoadTests.SampleTest testMethod=test_nothing>] is not callable
[    6s] ======================================================================
[    6s] ERROR: testscenarios.tests.test_scenarios.TestLoadTests.test_load_tests_apply_scenarios_old_style
[    6s] ----------------------------------------------------------------------
[    6s] Traceback (most recent call last):
[    6s]   File "/home/abuild/rpmbuild/BUILD/python-testscenarios-test-0.5.0-build/testscenarios-0.5.0/testscenarios/tests/test_scenarios.py", line 201, in test_load_tests_apply_scenarios_old_style
[    6s]     suite = load_tests_apply_scenarios(
[    6s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[    6s]   File "/home/abuild/rpmbuild/BUILD/python-testscenarios-test-0.5.0-build/testscenarios-0.5.0/testscenarios/scenarios.py", line 111, in load_tests_apply_scenarios
[    6s]     result.addTests(generate_scenarios(standard_tests))
[    6s]   File "/usr/lib64/python3.11/unittest/suite.py", line 58, in addTests
[    6s]     self.addTest(test)
[    6s]   File "/usr/lib64/python3.11/unittest/suite.py", line 47, in addTest
[    6s]     raise TypeError("{} is not callable".format(repr(test)))
[    6s] TypeError: [<testscenarios.tests.test_scenarios.TestLoadTests.SampleTest testMethod=test_nothing>] is not callable

I've bisected it down to being introduced in 7d62575

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions