You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.
I was writing a new test file, and I had an import error (I'd written from appA import X, instead of from appA.models import X)
When I ran the test by running:
./manage.py test project.appA.tests.test_for_stuff
I got the following error:
File "/home/bird/Dev/aptivate/econsensus/django/econsensus/.ve/local/lib/python2.7/site-packages/django/test/simple.py", line 380, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/home/bird/Dev/aptivate/econsensus/django/econsensus/.ve/local/lib/python2.7/site-packages/discover_runner/runner.py", line 40, in build_suite
suite = self.test_loader.loadTestsFromNames(test_labels)
File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_for_stuff'
I was a little confused by this because I thoguht it was trying to tell me my test_for_stuff file wasn't there.
I would have expected an ImportError.
The text was updated successfully, but these errors were encountered:
That's indeed odd, hmm. Wait, wouldn't you have to run ./manage.py test project.tests.appA.test_for_stuff? At least that's how I understand the directory structure you wrote above.
(First-up, many thanks for this excellent tool).
Here's my basic setup (all tests in one directory with sub directories for each apps tests:
I was writing a new test file, and I had an import error (I'd written
from appA import X
, instead offrom appA.models import X
)When I ran the test by running:
I got the following error:
I was a little confused by this because I thoguht it was trying to tell me my test_for_stuff file wasn't there.
I would have expected an ImportError.
The text was updated successfully, but these errors were encountered: