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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:07:15+00:00 2026-05-25T12:07:15+00:00

I have one python module that defines a set of base classes which another

  • 0

I have one python module that defines a set of base classes which another python module then implements.

The core python module also has test cases that test if the base classes are correctly implemented.

In the second module’s test suite, I would like to automatically generate the TestCase subclasses from the first module, and adding a mixin that does the necessary setUp() for the specific implementation.

I see lots of answers for parametrizing test cases, but in my case I just want to re-use the common classes and subclass all of them.

It’s ok if it needs some code in the parent test module to instantiate them, as long as it names the tests differently and runs them all automatically.

If it matters, this code is using twisted and trial over standard unittest.

  • 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-25T12:07:16+00:00Added an answer on May 25, 2026 at 12:07 pm

    Something that may do almost exactly what you want is twisted.internet.test.reactormixins.ReactorBuilder. You can see how it’s used in test_tcp, for example.

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

Sidebar

Related Questions

I have one thread that writes results into a Queue. In another thread (GUI),
I'm reading in a file with Python's csv module, and have Yet Another Encoding
I have a python module that is shared among several of my projects (the
Is there a way in Python, to have more than one constructor or more
I have a Python datetime.datetime object. What is the best way to subtract one
I have two String.printable mysteries in the one question. First, in Python 2.6: >>>
I have one field that I need to sum lets say named items However
I have one hibernate sequence, that generates all sequence-numbers in my app. When I
I have one std::list<> container and these threads: One writer thread which adds elements
I have one application which uses the standard .NET forms authentication cookie, now I

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.