Skip to content

Commit

Permalink
Merge pull request NREL#30 from softwareengineerprogrammer/main
Browse files Browse the repository at this point in the history
Add Windows to test matrix; fix Windows unit test failure
  • Loading branch information
softwareengineerprogrammer authored Nov 2, 2023
2 parents 93e675c + 5ce698a commit 12562a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ jobs:
python_arch: 'x64'
tox_env: 'py311'
os: 'macos-latest'
- name: 'py311 (windows)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'x64'
tox_env: 'py311'
os: 'windows-latest'

# - name: 'pypy38 (ubuntu)'
# python: 'pypy-3.8'
Expand Down
2 changes: 1 addition & 1 deletion src/hip_ra/HIP_RA.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def render_scientific(p: floatParameter | OutputParameter) -> str:
case_data = {'SUMMARY OF RESULTS': summary_of_results}

with open(outputfile, 'w', encoding='UTF-8') as f:
nl = os.linesep
nl = '\n'

f.write(f' *********************{nl}')
f.write(f' ***HIP CASE REPORT***{nl}')
Expand Down
4 changes: 2 additions & 2 deletions tests/base_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def assertListAlmostEqual(self, l1, l2, msg=None, places=7):
self.assertAlmostEqual(v1, v2, places=places, msg=msg)

def assertFileContentsEqual(self, f1, f2):
with open(f1) as f1_o:
with open(f2) as f2_o:
with open(f1, newline=None) as f1_o: # newline=None enables universal line endings which is required by Windows
with open(f2, newline=None) as f2_o:
f1_lines = f1_o.readlines()
f2_lines = f2_o.readlines()
self.assertListEqual(f1_lines, f2_lines)

0 comments on commit 12562a0

Please sign in to comment.