New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unittest: object has no attribute '_removed_tests' #67344
Comments
On NetBSD with python-3.4.2 I see the following issue when running the tests for py-flake8-2.2.5: running build_ext
test_get_parser (flake8.tests.test_engine.TestEngine) ... ok
test_get_python_version (flake8.tests.test_engine.TestEngine) ... ok
test_get_style_guide (flake8.tests.test_engine.TestEngine) ... ok
test_get_style_guide_kwargs (flake8.tests.test_engine.TestEngine) ... ok
test_register_extensions (flake8.tests.test_engine.TestEngine) ... ok
test_stdin_disables_jobs (flake8.tests.test_engine.TestEngine) ... ok
test_windows_disables_jobs (flake8.tests.test_engine.TestEngine) ... ok
Traceback (most recent call last):
File "setup.py", line 74, in <module>
test_suite='nose.collector',
File "/usr/pkg/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/pkg/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/pkg/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 142, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 122, in with_project_on_sys_path
func()
File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 163, in run_tests
testRunner=self._resolve_as_ep(self.test_runner),
File "/usr/pkg/lib/python3.4/unittest/main.py", line 93, in __init__
self.runTests()
File "/usr/pkg/lib/python3.4/unittest/main.py", line 244, in runTests
self.result = testRunner.run(self.test)
File "/usr/pkg/lib/python3.4/unittest/runner.py", line 168, in run
test(result)
File "/usr/pkg/lib/python3.4/unittest/suite.py", line 87, in __call__
return self.run(*args, **kwds)
File "/usr/pkg/lib/python3.4/unittest/suite.py", line 130, in run
self._removeTestAtIndex(index)
File "/usr/pkg/lib/python3.4/unittest/suite.py", line 83, in _removeTestAtIndex
self._removed_tests += test.countTestCases()
File "/usr/pkg/lib/python3.4/unittest/suite.py", line 41, in countTestCases
cases = self._removed_tests
AttributeError: 'FinalizingSuiteWrapper' object has no attribute '_removed_tests'
*** Error code 1 I have reported this https://gitlab.com/pycqa/flake8/issues/19#note_712215 and Ian Cordasco said this looks like a bug in the unittest module, not py-flake8. |
Keep in mind, this could also be a problem with NetBSD's distribution of python. |
The culprit is the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: