Python Forum
spread same class into separate files in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
spread same class into separate files in python
#4
I would agree with spreading it into multiple classes. When I'm building test code, I have one file of test code for each file in the program (and you may want to break your program up into more files). Each file has multiple test classes, each class typically for a different method or function. Each method of a test class tests a specific situation.

You might want to look at some of the test packages available. I use unittest, and it makes it easy to make the test classes and to share code between test cases. I can easily run all of the test cases in a file with one line, and easily make a program that runs all of the test files in a folder.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: spread same class into separate files in python - by ichabod801 - Jun-19-2019, 02:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Class test : good way to split methods into several files paul18fr 4 528 Jan-30-2024, 11:46 AM
Last Post: Pedroski55
  Split Bytearray into separate Files by Hex delimter lastyle 5 2,753 Mar-09-2023, 07:49 AM
Last Post: bowlofred
  Python Split json into separate json based on node value CzarR 1 5,710 Jul-08-2022, 07:55 PM
Last Post: Larz60+
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,407 May-17-2022, 07:49 AM
Last Post: Pedroski55
  How to save files in a separate directory Scordomaniac 3 2,026 Mar-16-2022, 10:17 AM
Last Post: Gribouillis
  Separate text files and convert into csv marfer 6 2,938 Dec-10-2021, 12:09 PM
Last Post: marfer
  Pythonic way to handle/spread alerts class in multiple modules psolar 11 4,702 Feb-12-2020, 04:11 PM
Last Post: psolar
  write each line of a text file into separate text files and save with different names Shameendra 3 2,818 Feb-20-2019, 09:07 AM
Last Post: buran
  instance of a class in different files DionisiO 2 2,489 Jan-21-2019, 09:38 PM
Last Post: DionisiO
  Running a python tool transforming xml files into epub files silfer 7 5,474 May-10-2018, 03:49 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020