Skip to content

Commit 0884456

Browse files
Merge pull request #82 from ISISComputingGroup/can_we_use_3_12_yet
Are we ready for 3.12 yet?
2 parents 4eacc3c + 4fb04b2 commit 0884456

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/Lint-and-test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ jobs:
77
compare-branch: origin/main
88
python-ver: '3.11'
99
tests:
10-
runs-on: ubuntu-latest
10+
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
version: ['3.10','3.11'] # ,'3.12'] # also check on 3.12 once https://github.com/bluesky/ophyd-async/pull/478 is merged.
13+
os: [ "ubuntu-latest", "windows-latest" ]
14+
version: ['3.10', '3.11', '3.12']
15+
fail-fast: false
1416
steps:
1517
- uses: actions/checkout@v4
1618
- uses: actions/setup-python@v5
1719
with:
1820
python-version: ${{ matrix.version }}
1921
- name: install requirements
2022
run: pip install -e .[dev]
21-
- name: run pytest
23+
- name: run pytest (linux)
2224
run: IBEX_BLUESKY_CORE_LOGS=/tmp/ibex_bluesky_core_logs/ python -m pytest
25+
if: startsWith(matrix.os,'ubuntu')
26+
- name: run pytest (windows)
27+
run: python -m pytest
28+
if: startsWith(matrix.os,'windows')
2329
results:
2430
if: ${{ always() }}
2531
runs-on: ubuntu-latest

tests/callbacks/test_write_log_callback.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_event_prints_header_with_units_and_respects_precision_of_value_on_first
7070
mock_file.assert_called_with(cb.filename, "a", newline="")
7171
first_call = call(f"\n{field_name}({units})\n")
7272
second_call = call(f"{expected_value:.{prec}f}\n")
73-
assert mock_file().write.has_calls(first_call, second_call)
73+
mock_file().write.assert_has_calls([first_call, second_call])
7474
assert mock_file().write.call_count == 2
7575

7676

@@ -93,9 +93,7 @@ def test_event_prints_header_without_units_and_does_not_truncate_precision_if_no
9393
cb.event(event)
9494

9595
mock_file.assert_called_with(cb.filename, "a", newline="")
96-
first_call = call(f"\n{field_name}({units})\n")
97-
second_call = call(f"{expected_value}\n")
98-
assert mock_file().write.has_calls(first_call, second_call)
96+
mock_file().write.assert_has_calls([call("\ntest\n"), call("1.2345\n")])
9997
assert mock_file().write.call_count == 2
10098

10199

0 commit comments

Comments
 (0)