From c14814b1f27b603154972c9a8f35751e62338185 Mon Sep 17 00:00:00 2001 From: Tieqiong Zhang Date: Thu, 21 Aug 2025 16:59:14 -0500 Subject: [PATCH] Normalize paths before assert --- news/headerfile.rst | 23 +++++++++++++++++++++++ tests/test_serialization.py | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 news/headerfile.rst diff --git a/news/headerfile.rst b/news/headerfile.rst new file mode 100644 index 00000000..13b35c28 --- /dev/null +++ b/news/headerfile.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Normalize paths before assert in `test_serialization/test_load_multiple` to prevent possible Windows short/long name mismatch. + +**Security:** + +* diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 039877f6..049d325c 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -33,7 +33,9 @@ def test_load_multiple(tmp_path, datafile): dt_colnames=["r", "gr"], show_path=True, ) - assert headerfile == Path(generated_data[headerfile.name].pop("path")) + assert Path(headerfile).resolve() == Path( + generated_data[headerfile.name].pop("path") + ) # rerun without path information and save to file generated_data = serialize_data(