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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:42:37+00:00 2026-05-27T11:42:37+00:00

I have a fairly complex system that I want to test using python. My

  • 0

I have a fairly complex system that I want to test using python. My test code will interact with the system using a Python module I’ve already written. There are a few things however, that I haven’t been able to figure out, regarding the testing framework. I haven’t selected one yet, but obviously I feel directed to unittest.

  1. Passing parameters to the tests. I need to pass a specific ID to many different parts of my test code, depending on which component of the system I am testing. Does unittest provide for this? In other words, right now I just have a test script, which I run like this: ./testscript.py 123 win 32 How can I pass the same parameters similarly in a testing framework?

  2. unittest provides for setUp() and tearDown() methods, but they are called before/after each test method. How can I have functions that are called before/after the entire battery of tests in a TestCase?

Maybe unittest is not what I actually want to use?

  • 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-27T11:42:37+00:00Added an answer on May 27, 2026 at 11:42 am

    As for #2, it seems that setUpClass() and tearDownClass() are designed for this. The documentation even shows an example of using it to createExpensiveConnectionObject().

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

Sidebar

Related Questions

I have a fairly complex content management system I've written in PHP, which has
We have a fairly complex application that was previously using WebForms. We are in
I have a fairly complex set of C++ classes that are re-written from Java.
I have a fat GUI that it getting fairly complex, and I would like
I have a web page that I use to update a fairly complex data
The scenario: Big system (~200 tables). 60,000 users. Complex reports that will require me
I have a fairly complex user drawn control that is double buffered. Works very
I have a fairly complex web app that was built (by a contractor) to
I have a fairly complex query that looks something like this: create table Items(SomeOtherTableID
I have a fairly complex query in SQL that performs a count across two

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.