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 6779341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:22:26+00:00 2026-05-26T16:22:26+00:00

I have the following typical python project file structure packageA +—-subpackage1 +—-classa.py +—-subpackage2 +—-classb.py

  • 0

I have the following typical python project file structure

packageA
   +----subpackage1
            +----classa.py
   +----subpackage2
            +----classb.py
   +----test
          +----subpackage1
                    +----classa_test.py 
          +----subpackage2
                    +----classb_test.py

I am currently trying to organize my unittests and functional tests so I can run unittests and functional tests separately using nose but also have the option to run all tests. The tests would live in packageA/test/subpackage1 and packageA/test/subpackage2.

  • What is a good way to organize the different tests? By folder (functional/ vs unit/) ? By naming convention of test class (ClassATest vs ClassAFunctionalTest)? or by naming convention of test methods (classa_foo_test vs classa_bar_functional_test)?
  • Can someone explain how nosetests’s regex matching works? The options -m, -i and -e don’t seem to run as I expect to run. Does the regex match directories (subpackage1), files (classa_test) or test classes (ClassATest) or test methods (classa_foo_test)? I am extremely confused
  • 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-26T16:22:27+00:00Added an answer on May 26, 2026 at 4:22 pm

    My tests directory structure looks this way:

    root
      + --- tests
      |       + --- unit_tests
      |       |         + --- some_app_tests   
      |       |         + --- another_app_tests
      |       |         | run_tests.py
      |       |
      |       + --- integrate_tests 
      |                 + --- some_app_tests
      |                 + --- another_app_tests
      |                 | run_tests.py
      |       
      + --- project_root
              + --- some_app
              + --- another_app
    

    For each individual app I create coresponding directory with tests in unit- and integrate- directory. Each is directory is separate django project with custom settings and there’s management command used to run tests.

    Also placing tests in one directory has one nice advantage – when project is deployed, there’s no reason to deploy tests with it. So I just strip one directory and that’s all.

    (to run tests I use django-sane-testing: https://github.com/Almad/django-sane-testing )

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

Sidebar

Related Questions

I have a navigation menu in xHTML with the following typical structure: <ul id=nav1>
I have written some Objective-C test cases. A typical looks the following: - (void)
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have following text in a file 23456789 When I tried to replace the
I have the following data structure in my database: LastName FirstName CourseName John Day
I have a very typical situation in any application, where i have the following
I have following problem. I have typical master/detail UI scenario. I set main object
I'm a Java rookie and I was wondering, if I have the following typical
Symfony uses the following typical .htaccess file: Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On
Suppose that I have the following python base class: class BaseClass(object): def a(): This

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.