steven meiers
2017-02-20 13:02:14 UTC
hi,
up to now ive only used the python unittest for my code, but now i
would also like to test the twisted part.
so i followed:
http://twistedmatrix.com/documents/current/core/howto/trial.html
but i get this error:
(venv) ***@t560:~/code/python/twisted/basics$ trial calculus
calculus
... [ERROR]
=======================================================================
========
[ERROR]
Traceback (most recent call last):
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/trial/runner.py", line 781, in loadByName
return self.suiteFactory([self.findByName(name, recurse=recurse)])
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/trial/runner.py", line 710, in findByName
obj = reflect.namedAny(name)
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/python/reflect.py", line 306, in namedAny
raise ModuleNotFound("No module named %r" % (name,))
twisted.python.reflect.ModuleNotFound: No module named 'calculus'
calculus
---------------------------------------------------------------------
----------
Ran 1 tests in 0.024s
FAILED (errors=1)
heres how my calculus directory looks like:
find . | grep -v './venv/'
.
./__pycache__
./__pycache__/__init__.cpython-35.pyc
./test
./test/test_base_1.py
./test/__init__.py
./venv
./__init__.py
./base_1.py
./__init__.pyc
venv contains the virtualenv created by "virtualenv -p /usr/bin/python3
venv"
the __init__.py files are empty and test_base_1.py / base_1.py contains
what is shown in the tutorial.
any idea why this does not work?
up to now ive only used the python unittest for my code, but now i
would also like to test the twisted part.
so i followed:
http://twistedmatrix.com/documents/current/core/howto/trial.html
but i get this error:
(venv) ***@t560:~/code/python/twisted/basics$ trial calculus
calculus
... [ERROR]
=======================================================================
========
[ERROR]
Traceback (most recent call last):
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/trial/runner.py", line 781, in loadByName
return self.suiteFactory([self.findByName(name, recurse=recurse)])
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/trial/runner.py", line 710, in findByName
obj = reflect.namedAny(name)
File
"/home/julius/code/python/twisted/basics/calculus/venv/lib/python3.5/si
te-packages/twisted/python/reflect.py", line 306, in namedAny
raise ModuleNotFound("No module named %r" % (name,))
twisted.python.reflect.ModuleNotFound: No module named 'calculus'
calculus
---------------------------------------------------------------------
----------
Ran 1 tests in 0.024s
FAILED (errors=1)
heres how my calculus directory looks like:
find . | grep -v './venv/'
.
./__pycache__
./__pycache__/__init__.cpython-35.pyc
./test
./test/test_base_1.py
./test/__init__.py
./venv
./__init__.py
./base_1.py
./__init__.pyc
venv contains the virtualenv created by "virtualenv -p /usr/bin/python3
venv"
the __init__.py files are empty and test_base_1.py / base_1.py contains
what is shown in the tutorial.
any idea why this does not work?