On Fri, Jul 11, 2014 at 10:44 AM, Russell Keith-Magee
<[email protected]> wrote:
> Hi Larry
>
> On Fri, Jul 11, 2014 at 9:37 PM, Larry Martell <[email protected]>
> wrote:
>>
>> On Thu, Jul 10, 2014 at 8:35 PM, Russell Keith-Magee
>> <[email protected]> wrote:
>>
>> I appreciate the detailed reply, and I think I understand all this,
>> but I still cannot get my tests to run. Let's look at one test.
>>
>> My tests are in this dir: /usr/local/motor/motor/app/cdsem/tests
>
>
> Ok -
>
>  * Do you have an __init__.py in the cdsem/tests directory?

Yes. I changed it from this:

from motor.app.cdsem.tests.EventLog import EventLogTest

to this:

from motor.app.cdsem.tests.testEventLog import EventLogTest

>  * Which directory is manage.py in?

/usr/local/motor

>  * What's your PYTHONPATH?

That is not set.

> I have a suspicion that the problem might be caused by your directory
> structure. There's a few more directories there than I would expect to see,
> which suggests to me that there might be problem with the interaction of
> PYTHONPATH with manage.py.

This all works with 1.5.

> One way that might help diagnose the problem:
>
> ./manage.py test -v 2

With no args I see:

motor.app.cdsem.tests.testEventLog
(unittest.loader.ModuleImportFailure) ... ERROR

When I run:

./manage.py test -v 2 motor.app.cdsem.tests.testEventLog

I get:

AttributeError: 'module' object has no attribute 'tests'


This is the full traceback:

  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py",
line 399, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py",
line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/Library/Python/2.7/site-packages/django/core/management/commands/test.py",
line 50, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py",
line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/Library/Python/2.7/site-packages/django/core/management/commands/test.py",
line 71, in execute
    super(Command, self).execute(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py",
line 285, in execute
    output = self.handle(*args, **options)
  File 
"/Library/Python/2.7/site-packages/django/core/management/commands/test.py",
line 88, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Library/Python/2.7/site-packages/django/test/runner.py", line
144, in run_tests
    suite = self.build_suite(test_labels, extra_tests)
  File "/Library/Python/2.7/site-packages/django/test/runner.py", line
63, in build_suite
    tests = self.test_loader.loadTestsFromName(label)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py",
line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'tests'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY4Q7HG-oV4ZWeFuRfB%2BAq6C%2Bc565HGSD8uf-dvaoJ0CbQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to