From ffb35a9cf894b86d674b4c4d43bb1142abec7ef4 Mon Sep 17 00:00:00 2001 From: Santosh Philip Date: Sun, 5 Nov 2023 09:31:39 -0800 Subject: [PATCH] modified: eppy/pytest_helpers.py modified: eppy/runningnotes.txt modified: tests/test_parse_error.py modified: tests/test_runner.py --- eppy/pytest_helpers.py | 13 ------------- eppy/runningnotes.txt | 5 +++++ tests/test_parse_error.py | 32 ++++++++++++++++---------------- tests/test_runner.py | 2 -- 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/eppy/pytest_helpers.py b/eppy/pytest_helpers.py index a6be8584..4e8aae5b 100755 --- a/eppy/pytest_helpers.py +++ b/eppy/pytest_helpers.py @@ -33,24 +33,11 @@ def do_integration_tests(): """ try: - print(f"{os.environ['GITHUB_ACTION'] = }") - print(f"{os.environ['ENERGYPLUS_SHA'] = }") - print(f"{os.environ['ENERGYPLUS_VERSION'] = }") - print(f"{os.environ['ENERGYPLUS_INSTALL_VERSION'] = }") - print(f"{os.environ['EPPY_INTEGRATION'] = }") - except KeyError as e: - print("not on CI - on local machine") - try: - print(f"{os.environ['EPPY_INTEGRATION'] = }") result = os.environ['EPPY_INTEGRATION'] - print(f" Actual EPPY_INTEGRATION = {result}") - # --- except KeyError as e: result = False - # result = os.getenv("EPPY_INTEGRATION", False) if result == "TRUE": # github CI returns strings 9no booleans) result = True - print(f" **** EPPY_INTEGRATION = {result}") return result diff --git a/eppy/runningnotes.txt b/eppy/runningnotes.txt index 8f89459a..fb140112 100644 --- a/eppy/runningnotes.txt +++ b/eppy/runningnotes.txt @@ -1,3 +1,8 @@ +2023-11-05 +---------- + +put double quote in VERSION = os.environ['ENERGYPLUS_INSTALL_VERSION'] of conftest.py and test_runner.py + 2022-12-21 ---------- diff --git a/tests/test_parse_error.py b/tests/test_parse_error.py index 339c48bb..1019f15a 100644 --- a/tests/test_parse_error.py +++ b/tests/test_parse_error.py @@ -25,20 +25,20 @@ def test_capture_stderr(): sys.stderr = sys.__stderr__ -# def test_capture_real_error(test_idf): -# test_idf.newidfobject( -# "HVACTemplate:Thermostat", -# Name="thermostat VRF", -# Heating_Setpoint_Schedule_Name=15, -# Constant_Cooling_Setpoint=25, -# ) -# rundir = "test_capture_real_error" -# os.mkdir(rundir) -# try: -# test_idf.run(output_directory=rundir) -# except EnergyPlusRunError as e: -# assert "invalid Heating Setpoint Temperature Schedule" in str(e) -# finally: -# shutil.rmtree(rundir) -# safeIDDreset() +def test_capture_real_error(test_idf): + test_idf.newidfobject( + "HVACTemplate:Thermostat", + Name="thermostat VRF", + Heating_Setpoint_Schedule_Name=15, + Constant_Cooling_Setpoint=25, + ) + rundir = "test_capture_real_error" + os.mkdir(rundir) + try: + test_idf.run(output_directory=rundir) + except EnergyPlusRunError as e: + assert "invalid Heating Setpoint Temperature Schedule" in str(e) + finally: + shutil.rmtree(rundir) + safeIDDreset() \ No newline at end of file diff --git a/tests/test_runner.py b/tests/test_runner.py index 5a6bf704..199e3c4d 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -484,8 +484,6 @@ def test_version(self, capfd, test_idf): expected_version = VERSION.replace("-", ".") version_string = "EnergyPlus, Version {}".format(expected_version) - print(f"{out.strip() = }") - print(f"{version_string = }") assert out.strip().startswith(version_string) def test_help(self, capfd, test_idf):