setup.py test doesn't pass on clean repo clone
See original GitHub issuePython 3.5:
[1/1] test
test test crashed -- Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/test/regrtest.py", line 1292, in runtest_inner
the_module = importlib.import_module(abstest)
File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'test.test'
1 test failed:
test
Python 2.7:
running build_ext
Traceback (most recent call last):
File "setup.py", line 19, in <module>
'requests-mock>=1.0,<1.1a0'
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/test.py", line 118, in with_project_on_sys_path
func()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/test.py", line 164, in run_tests
testLoader = cks
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/test.py", line 35, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/autotest.py", line 5, in <module>
from test import regrtest
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/regrtest.py", line 183, in <module>
for module in sys.modules.itervalues():
RuntimeError: dictionary changed size during iteration
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
"Can't get a consistent path to setup script from installation ...
You need to have a pyproject.toml file in your package. I have no idea why this makes the error go away, but it...
Read more >Knowledge Bits — Common Python Packaging Mistakes
An overview of common mistakes made in creating & building a Python package and how to avoid them.
Read more >Packaging and distributing projects
Before releasing on main PyPI repo, you might prefer training with the PyPI test site which is cleaned on a semi regular basis....
Read more >PyPI Repositories - JFrog - JFrog Documentation
To define a virtual PyPI repository, from the Administration module, go to Repositories | Repositories | Virtual, set its Package Type to be ......
Read more >git-clone Documentation - Git
DESCRIPTION. Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m trying to run through them all now, I can attach a unified diff as a starting point
Edit: Tests now run without import errors, still failures. Taking a look
Coolio.
Attached is a diff that will fix the import errors. fixed_imports.txt
And an output from the failures. Looks like a lot of typeerrors with str: failures.txt
Example:
EDIT:
It’s because we read the xml in as binary mode, in python3 that’s not a valid string type.
Could become:
Or, more correctly: