Skip to content

Commit 0b8f7be

Browse files
committed
teardownclass
1 parent 5bd2171 commit 0b8f7be

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

tests/endtoend/test_http_functions.py

+16
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,22 @@ def get_environment_variables(cls):
229229
@unittest.skipIf(sys.version_info.minor <= 7, "Skipping tests <= Python 3.7")
230230
class TestHttpFunctionsV2FastApiWithInitIndexing(
231231
TestHttpFunctionsWithInitIndexing):
232+
233+
@classmethod
234+
def setUpClass(cls):
235+
cls.env_variables[PYTHON_ENABLE_INIT_INDEXING] = '1'
236+
os.environ[PYTHON_ENABLE_INIT_INDEXING] = "1"
237+
super().setUpClass()
238+
239+
@classmethod
240+
def tearDownClass(cls):
241+
os.environ.pop(PYTHON_ENABLE_INIT_INDEXING)
242+
super().tearDownClass()
243+
244+
@classmethod
245+
def get_environment_variables(cls):
246+
return cls.env_variables
247+
232248
@classmethod
233249
def get_script_dir(cls):
234250
return testutils.E2E_TESTS_FOLDER / 'http_functions' / \

tests/endtoend/test_worker_process_count_functions.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def setUpClass(cls):
2222

2323
super().setUpClass()
2424

25-
def tearDown(self):
25+
@classmethod
26+
def tearDownClass(cls):
2627
os.environ.pop('PYTHON_THREADPOOL_THREAD_COUNT')
2728
os.environ.pop('FUNCTIONS_WORKER_PROCESS_COUNT')
2829

0 commit comments

Comments
 (0)