Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-7079] Added verbose param to h2o.init() and guarded h2o.conn.show_status() in h20.py #7079 [nocheck] #15653

Merged
merged 10 commits into from
Oct 10, 2023
Prev Previous commit
Next Next commit
GH-15672: Tomas Fryda suggested instead of changing every test, the c…
…hange should be made in standalone test. He provides the code and I just copied and pasted. (#15675)
  • Loading branch information
wendycwong authored and Mohit1345 committed Aug 17, 2023
commit d10faa09da59f2c527021b51de936148663ef7bc
12 changes: 11 additions & 1 deletion h2o-py/tests/pyunit_utils/utilsPY.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,17 @@ def standalone_test(test, init_options={}):
h2o.log_and_echo("STARTING TEST "+test.__name__)
h2o.log_and_echo("")
h2o.log_and_echo("------------------------------------------------------------")
test()
import os
import tempfile
with tempfile.TemporaryDirectory() as dir: # Create a temporary dir that will clean itself
tempfile._once_lock.acquire() # Better lock to avoid race conditions (but since we don't test in multiple threads (to avoid side-effects on the backend) it should not matter)
old_tempdir = tempfile.tempdir
try:
tempfile.tempdir = dir # Tell tempfile to use this temporary dir as the root for all other temporary dirs
test()
finally:
tempfile.tempdir = old_tempdir
tempfile._once_lock.release()

def run_tests(tests, run_in_isolation=True, init_options={}):
#flatten in case of nested tests/test suites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import tempfile
import os


# Check and make sure transformed gam frame is correctedly saved with h2o.save_moddel
def test_gam_transformed_frame_serialization():
h2o_data = h2o.import_file(
Expand Down