tests and ruff · RascalSoftware/python-RAT@b16ca9f · GitHub
Skip to content

Commit b16ca9f

Browse files
committed
tests and ruff
1 parent 1ea8af1 commit b16ca9f

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

ratapi/utils/convert.py

Lines changed: 8 additions & 1 deletion

ratapi/utils/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def update_plot(self, data):
492492
"""
493493
if self.figure is not None:
494494
self.figure.clf()
495-
495+
496496
self.figure.tight_layout()
497497
plot_ref_sld_helper(
498498
data,

tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6858,7 +6858,11 @@ def r1_monolayer():
68586858
),
68596859
custom_files=ratapi.ClassList(
68606860
ratapi.models.CustomFile(
6861-
name="Model_IIb", filename="Model_IIb.m", function_name="Model_IIb", language="matlab"
6861+
name="Model_IIb",
6862+
filename="Model_IIb.m",
6863+
function_name="Model_IIb",
6864+
language="matlab",
6865+
path=Path(__file__).parent / "test_data",
68626866
)
68636867
),
68646868
)

tests/test_controls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ def test_initialise_IPC() -> None:
891891
assert test_controls._IPCFilePath != ""
892892
with open(test_controls._IPCFilePath, "rb") as f:
893893
file_content = f.read()
894-
assert file_content == b"0"
894+
assert file_content == b"\x00"
895895
os.remove(test_controls._IPCFilePath)
896896

897897

@@ -900,7 +900,7 @@ def test_sendStopEvent(IPC_controls) -> None:
900900
IPC_controls.sendStopEvent()
901901
with open(IPC_controls._IPCFilePath, "rb") as f:
902902
file_content = f.read()
903-
assert file_content == b"1"
903+
assert file_content == b"\x01"
904904

905905

906906
def test_sendStopEvent_empty_file() -> None:

tests/test_convert.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)