What if you add a __init__.py inside AAA directory and in your abc/
tests.py you include "from projectXXX.AAA.xyz import class_to_test"
plus all the test code you want for testing it ?

Good luck!

Roberto

On Nov 18, 12:05 pm, girish shabadimath <girishmss.1...@gmail.com>
wrote:
> I will try out that ,,
>
>
>
>
>
>
>
>
>
> On Thu, Nov 18, 2010 at 6:47 PM, xvga <vgri...@gmail.com> wrote:
> > I guess one way would  be to put xyz.py in own app. Remember though to
> > have models.py(empty is fine too) in the app dir
>
> > On Nov 18, 2:27 pm, girish shabadimath <girishmss.1...@gmail.com>
> > wrote:
> > > Thanks for the reply,
> > > but according to the django documentationhttp://
> > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > >  <
> >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > >test
> > > runner looks for tests only in models.py or tests.py of a specific
> > > application,,but my xyz.py is not present in any of the application.
>
> > > On Thu, Nov 18, 2010 at 4:42 PM, xvga <vgri...@gmail.com> wrote:
> > > > Hi Girish,
>
> > > > why don't you put tests.py in the same dir where xyz.py is?
>
> > > > On Nov 18, 11:52 am, girish shabadimath <girishmss.1...@gmail.com>
> > > > wrote:
> > > > > Hi all,
>
> > > > > im working on a django project XXX,
>
> > > > > the directory structure is as follows:
>
> > > > > - project XXX
> > > > >       -abc
> > > > >          models.py
> > > > >          views.py
> > > > >          tests.py
> > > > >          urls.py
> > > > >      +docs
> > > > >      +libs
> > > > >      +logs
> > > > >      +thirdparty
> > > > >      +corns
> > > > >       - AAA
> > > > >          xyz.py
> > > > >          aaa.py
> > > > >      settings.py
> > > > >      urls.py
>
> > > > > i need to write tests for xyz.py,  as i understood by readinghttp://
> > > > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > > > >  <
> > > >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
>
> > > > > ,tests
> > > > > need to be present in any one application directory (here its abc ),
> > but
> > > > > xyz.py is not related to abc application so i cant
> > > > > write tests for xyz.py in abc application. Where actually i should be
> > > > > writing tests in this case?,,is there any other way?
>
> > > > > --
> > > > > Girish M S
>
> > > > --
> > > > 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<django-users%2bunsubscr...@google
> > > >  groups.com>
> > <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@g 
> > ooglegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/django-users?hl=en.
>
> > > --
> > > Girish M S
>
> > --
> > 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<django-users%2bunsubscr...@google 
> > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Girish M S

-- 
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.

Reply via email to