Repository navigation
setup.py test doesn't pass on clean repo clone #3
Copy link
Copy link
Closed
Milestone
Description
Python 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
Reactions are currently unavailable
Activity
graysonarts commentedon Sep 2, 2016
@shinchris This is because you are missing
__init__.pyin the test directory.t8y8 commentedon Sep 2, 2016
Adding an empty
__init__file gets them to run, I've got 9 failures on python 3It's due to relative import problems.
I fixed one by saying
from .exceptions import <blah>but then there's another.Example:
graysonarts commentedon Sep 2, 2016
Definitely need to get these fixed before we can release 0.1
t8y8 commentedon Sep 2, 2016
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
t8y8 commentedon Sep 2, 2016
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:
#3 addressing test failures (#15)