Skip to content

Commit

Permalink
Fixes failing test on python 3.13 and ensure macOS uses 3.12 (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex H. Room <[email protected]>
  • Loading branch information
StephenNneji and alexhroom authored Nov 6, 2024
1 parent 39a5b76 commit 02c48e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
# of local package.
mkdir tmp
cp -r tests tmp/tests/
export PATH="$pythonLocation:$PATH"
CIBW_TEST_COMMAND='cd ${pwd}/tmp && python -m pytest tests'
echo "CIBW_TEST_COMMAND=${CIBW_TEST_COMMAND}" >> $GITHUB_ENV
python -m pip install cibuildwheel==2.16.5
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
version: ["3.9", "3.12"]
version: ["3.9", "3.13"]
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -52,5 +52,6 @@ jobs:
sudo apt install libomp-dev
- name: Install and Test with pytest
run: |
export PATH="$pythonLocation:$PATH"
python -m pip install -e .[Dev]
pytest tests/ --cov=RATapi --cov-report=term
5 changes: 3 additions & 2 deletions tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,9 @@ def test_write_script(project, request, temp_dir, input_filename: str) -> None:
assert script_path.exists()

# Test we get the project object we expect when running the script
exec(script_path.read_text())
new_project = locals()["problem"]
local_dict = {}
exec(script_path.read_text(), globals(), local_dict)
new_project = local_dict["problem"]

for class_list in RATapi.project.class_lists:
assert getattr(new_project, class_list) == getattr(test_project, class_list)
Expand Down

0 comments on commit 02c48e9

Please sign in to comment.