Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7676333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:10:34+00:00 2026-05-31T17:10:34+00:00

Now I have a python project, I write my unit-testing code in many of

  • 0

Now I have a python project, I write my unit-testing code in many of its folders, the tree looks like:

Project
├── module1
│   ├── submodule1
│   │   ├── base.py
│   │   ├── model.py
│   │   └── tests.py
│   ├── conn.py
│   ├── __init__.py
│   └── tests.py
├── errors.py
├── __init__.py
├── router.py
└── tests.py

You can see there are many tests.py files in the projects, at root folder in modules. I use nose to help me do testing, When I want to test all of them, just run nosetests Project at upper folder, everything works fine.

Then comes to my question: I have seen some projects like tornado, they put all test files in one folder so that it is clear to manage them (I guess), is that a better way than what I do currently, if yes, then why ? And according to the philosophy of Python, is there anything wrong in my way of doing test ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:10:36+00:00Added an answer on May 31, 2026 at 5:10 pm

    Personnally, I prefer to store my test files into a specific subdirectory test, yet I like to keep test and code very near, so I have test subdirectories every where in my project.

     Project
        ├── module1
        │   ├── submodule1
        │   │   ├── base.py
        │   │   ├── model.py
        │   │   └── test
        │   │       └── submodule1_test.py
        │   ├── conn.py
        │   ├── __init__.py
        │   └── test
        │       └── module1_test.py
        ├── errors.py
        ├── __init__.py
        ├── router.py
        └── test
            └── errors_test.py
            └── router_test.py
    

    Very easy to make a packaging with avoiding all tests directories.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to have an at-home project now that I'm working on Python/Django at
I have been learning Python for a while, and now I'd like to learn
I have been studying unicode and its Python implementation now for two days, and
I recently came upon a new project with Python as the code-base. I have
I've been using Textmate for Ruby/Python scripting for awhile and now have a need
I have a python process running now , but it hangs with no log、no
I have been learning python for some time now. While starting this learning python
I have written a python script with methods in it. Now I want to
Anyone have experience playing audio (right now specifically mp3s) with python using a any
I have committed to learning C now, I'm good with Python/PHP/Bash but I've decided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.