On 01/18/2010 09:19 PM, Reinout van Rees wrote: > On 01/18/2010 08:40 PM, Olivier Guilyardi wrote: >> Hi, >> >> I'm trying to split tests.py into individual files into a tests/ >> subfolder, but >> that doesn't work. >> >> I correctly import everything from within tests/__init__.py, as >> previously said >> on this mailing list: >> http://groups.google.com/group/django-users/browse_frm/thread/10cfd65e398360d2/dae3a7226dccdc5f >> >> >> But that doesn't work. I tested on Django 1.0.2 and SVN r12255, same >> thing. > > Wild guess: place the test code in normal python test files inside the > tests/ folder instead of in the __init__.py? (I tend to keep that one > virtually empty anyway).
Yes, I like it almost empty too :) > Again: pretty wild guess ;-) My __init__.py just contains an import statement, that is: from individual_test import * where individual_test.py resides in tests/ It doesn't work so far. I'm not sure why, but splitting individual files tend to be a complex matter in my Django experience. For example, when moving models from models.py to models/, I needed to add an app_label to models' Meta class. That's a different problem, but there seem to be some obscurity in the way things get loaded. -- Olivier
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.