Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimize unittest loading
#1
Hello everyone,

I have a problem, let me describe it.

I've written a unittest (actually, an integration test) for the whole flow of my application (the flow from incoming request to outgoing response). All works fine, but...
When I run my test, the system is preparing (loads all imports, components, modules) for the whole flow, and this takes too much time (over 3 minutes) only for preparation, and only then it runs the test (which takes only 10 seconds).

How can I speedup my test runner? Is there a way to optimize the process? Maybe somehow disable forcing of *.pyc files regeneration or some other way?
Reply


Messages In This Thread
Optimize unittest loading - by Nazz - Mar-05-2019, 09:04 AM
RE: Optimize unittest loading - by Larz60+ - Mar-05-2019, 09:36 AM
RE: Optimize unittest loading - by Nazz - Mar-05-2019, 09:49 AM
RE: Optimize unittest loading - by Nazz - Mar-05-2019, 11:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in using unittest akbarza 2 258 Feb-25-2024, 12:51 PM
Last Post: deanhystad
  How can I multithread to optimize a groupby task: davisc4468 0 674 Jun-30-2023, 02:45 PM
Last Post: davisc4468
Question Unwanted execution of unittest ThomasFab 9 1,949 Nov-15-2022, 05:33 PM
Last Post: snippsat
  unittest.mock for an api key silver 3 1,336 Aug-29-2022, 03:52 PM
Last Post: ndc85430
  do you have an idea to optimize this code[recursion]]? netanelst 4 1,239 May-20-2022, 06:41 PM
Last Post: jefsummers
  Ran 0 tests in 0.000s - unittest Peaches 8 4,929 Dec-31-2021, 08:58 AM
Last Post: Peaches
  Optimization using scipy.optimize KaneBilliot 3 1,867 Nov-30-2021, 08:03 AM
Last Post: Gribouillis
  Using curve_fit to optimize function (TypeError) Laplace12 4 2,454 Aug-30-2021, 11:15 AM
Last Post: Larz60+
Sad Problem with Unittest mhanusek 1 3,680 Nov-12-2020, 04:58 PM
Last Post: Gribouillis
  Unittest et patch mad31 2 2,072 Aug-09-2020, 06:16 AM
Last Post: mad31

Forum Jump:

User Panel Messages

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