Commit ce04ec28

Stainless Bot <107565488+stainless-bot@users.noreply.github.com>
2023-12-22 11:48:12
test: run the garbage collector less often (#1003)
1 parent 819ae68
Changed files (1)
tests/test_client.py
@@ -208,8 +208,8 @@ class TestOpenAI:
         ITERATIONS = 10
         for _ in range(ITERATIONS):
             build_request(options)
-            gc.collect()
 
+        gc.collect()
         snapshot_after = tracemalloc.take_snapshot()
 
         tracemalloc.stop()
@@ -871,8 +871,8 @@ class TestAsyncOpenAI:
         ITERATIONS = 10
         for _ in range(ITERATIONS):
             build_request(options)
-            gc.collect()
 
+        gc.collect()
         snapshot_after = tracemalloc.take_snapshot()
 
         tracemalloc.stop()