From f4ee8587e407ccef92aaf6ac1975249e6de96675 Mon Sep 17 00:00:00 2001 From: jrobinAV Date: Thu, 15 Feb 2024 19:48:58 +0100 Subject: [PATCH] Attempt to isolate side effect --- ...st_write_multiple_sheet_excel_data_node.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/core/data/test_write_multiple_sheet_excel_data_node.py b/tests/core/data/test_write_multiple_sheet_excel_data_node.py index 8998622b43..91ecdb203c 100644 --- a/tests/core/data/test_write_multiple_sheet_excel_data_node.py +++ b/tests/core/data/test_write_multiple_sheet_excel_data_node.py @@ -202,11 +202,11 @@ def test_write_with_header_multiple_sheet_custom_exposed_type_with_sheet_name(tm assert all(actual == expected for actual, expected in zip(excel_dn_data[sheet_name], sheet_data[sheet_name])) -def test_write_with_header_multiple_sheet_custom_exposed_type_without_sheet_name(tmp_excel_file_2): +def test_write_with_header_multiple_sheet_custom_exposed_type_without_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, - properties={"path": tmp_excel_file_2, "exposed_type": MyCustomObject}) + properties={"path": tmp_excel_file, "exposed_type": MyCustomObject}) row_1 = [MyCustomObject(0, 1, "hi"), MyCustomObject(1, 2, "world"), MyCustomObject(2, 3, "text")] row_2 = [MyCustomObject(0, 4, "hello"), MyCustomObject(1, 5, "abc"), MyCustomObject(2, 6, ".")] @@ -219,11 +219,11 @@ def test_write_with_header_multiple_sheet_custom_exposed_type_without_sheet_name assert all(actual == expected for actual, expected in zip(excel_dn_data[sheet_name], sheet_data[sheet_name])) -def test_write_without_header_multiple_sheet_pandas_with_sheet_name(tmp_excel_file_2): +def test_write_without_header_multiple_sheet_pandas_with_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, - properties={"path": tmp_excel_file_2, "sheet_name": sheet_names, "has_header": False} + properties={"path": tmp_excel_file, "sheet_name": sheet_names, "has_header": False} ) df_1 = pd.DataFrame([*zip([1, 2, 3])]) @@ -252,8 +252,8 @@ def test_write_without_header_multiple_sheet_pandas_with_sheet_name(tmp_excel_fi assert np.array_equal(excel_dn_data[sheet_name].to_numpy(), pd.DataFrame(sheet_data[sheet_name]).to_numpy()) -def test_write_without_header_multiple_sheet_pandas_without_sheet_name(tmp_excel_file_2): - excel_dn = ExcelDataNode("foo", Scope.SCENARIO, properties={"path": tmp_excel_file_2, "has_header": False}) +def test_write_without_header_multiple_sheet_pandas_without_sheet_name(tmp_excel_file): + excel_dn = ExcelDataNode("foo", Scope.SCENARIO, properties={"path": tmp_excel_file, "has_header": False}) df_1 = pd.DataFrame([*zip([1, 2, 3])]) df_2 = pd.DataFrame([*zip([4, 5, 6])]) @@ -281,11 +281,11 @@ def test_write_without_header_multiple_sheet_pandas_without_sheet_name(tmp_excel assert np.array_equal(excel_dn_data[sheet_name].to_numpy(), pd.DataFrame(sheet_data[sheet_name]).to_numpy()) -def test_write_without_header_multiple_sheet_numpy_with_sheet_name(tmp_excel_file_3): +def test_write_without_header_multiple_sheet_numpy_with_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, - properties={"path": tmp_excel_file_3, "sheet_name": sheet_names, "exposed_type": "numpy", "has_header": False}, + properties={"path": tmp_excel_file, "sheet_name": sheet_names, "exposed_type": "numpy", "has_header": False}, ) arr_1 = np.array([[1], [2], [3]]) @@ -309,11 +309,11 @@ def test_write_without_header_multiple_sheet_numpy_with_sheet_name(tmp_excel_fil assert np.array_equal(excel_dn_data[sheet_name], sheet_data[sheet_name]) -def test_write_without_header_multiple_sheet_numpy_without_sheet_name(tmp_excel_file_3): +def test_write_without_header_multiple_sheet_numpy_without_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, - properties={"path": tmp_excel_file_3, "exposed_type": "numpy", "has_header": False} + properties={"path": tmp_excel_file, "exposed_type": "numpy", "has_header": False} ) arr_1 = np.array([[1], [2], [3]]) @@ -337,12 +337,12 @@ def test_write_without_header_multiple_sheet_numpy_without_sheet_name(tmp_excel_ assert np.array_equal(excel_dn_data[sheet_name], sheet_data[sheet_name]) -def test_write_without_header_multiple_sheet_custom_exposed_type_with_sheet_name(tmp_excel_file_3): +def test_write_without_header_multiple_sheet_custom_exposed_type_with_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, properties={ - "path": tmp_excel_file_3, + "path": tmp_excel_file, "sheet_name": sheet_names, "exposed_type": MyCustomObject, "has_header": False, @@ -360,11 +360,11 @@ def test_write_without_header_multiple_sheet_custom_exposed_type_with_sheet_name assert all(actual == expected for actual, expected in zip(excel_dn_data[sheet_name], sheet_data[sheet_name])) -def test_write_without_header_multiple_sheet_custom_exposed_type_without_sheet_name(tmp_excel_file_3): +def test_write_without_header_multiple_sheet_custom_exposed_type_without_sheet_name(tmp_excel_file): excel_dn = ExcelDataNode( "foo", Scope.SCENARIO, - properties={"path": tmp_excel_file_3, "exposed_type": MyCustomObject, "has_header": False} + properties={"path": tmp_excel_file, "exposed_type": MyCustomObject, "has_header": False} ) row_1 = [MyCustomObject(0, 1, "hi"), MyCustomObject(1, 2, "world"), MyCustomObject(2, 3, "text")]