Skip to content

Commit

Permalink
modified: eppy/pytest_helpers.py
Browse files Browse the repository at this point in the history
    modified:   eppy/runningnotes.txt
    modified:   tests/test_parse_error.py
    modified:   tests/test_runner.py
  • Loading branch information
Santosh Philip committed Nov 5, 2023
1 parent 8c5c68b commit ffb35a9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 31 deletions.
13 changes: 0 additions & 13 deletions eppy/pytest_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
5 changes: 5 additions & 0 deletions eppy/runningnotes.txt
Original file line number Diff line number Diff line change
@@ -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
----------

Expand Down
32 changes: 16 additions & 16 deletions tests/test_parse_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

2 changes: 0 additions & 2 deletions tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ffb35a9

Please sign in to comment.