Repository: sanders41/sas7bdat-converter (language: python)

Issue:
Missing f in line 411
Hi,

Please update this line, below is my results.

![image](https://user-images.githubusercontent.com/22544491/104438700-41776d80-55cb-11eb-9bd9-224ab6b0e692.png)
![image](https://user-images.githubusercontent.com/22544491/104438759-50f6b680-55cb-11eb-8944-0b8290812245.png)

Thanks


Discussion / hints:
Thanks for this report. I have made the update and published a new version to pypi.

Fix patch:
diff --git a/README.md b/README.md
index 134206b..bd1ce53 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,6 @@
 [![Lint Status](https://github.com/sanders41/sas7bdat_converter/workflows/Linting/badge.svg?branch=master&event=push)](https://github.com/sanders41/sas7bdat_converter/actions?query=workflow%3ALinting+branch%3Amaster+event%3Apush)
 [![Coverage](https://codecov.io/github/sanders41/sas7bdat_converter/coverage.svg?branch=master)](https://codecov.io/gh/sanders41/sas7bdat_converter)
 
-
 Converts proprietary sas7bdat and/or xport files from SAS into formats such as csv, json, and Excel useable
 by other programs. Currently supported conversiaions are csv, Excel (xlsx format), json, Pandas
 DataFrame, and XML.
@@ -12,6 +11,7 @@ DataFrame, and XML.
 Conversions can be done on either a single file, an entire directory, or a batch of specified files.
 
 ## Install
+
 `pip install sas7bdat-converter`
 
 If you would like to be able to convert to Excel files you will need to install with the extra Excel dependency.
@@ -31,8 +31,9 @@ extension, xport files with a .xpt extension will also work.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   file_dicts = [
@@ -59,8 +60,9 @@ extension, xport files with a .xpt extension will also work.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   file_dicts = [
@@ -87,8 +89,9 @@ extension, xport files with a .xpt extension will also work.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   file_dicts = [
@@ -115,8 +118,9 @@ extension, xport files with a .xpt extension will also work.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converters
 
   file_dicts = [
@@ -144,8 +148,9 @@ files at once. File paths can be sent as either strings or Path objects.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   # Option 1: put the converted files in the same directory as the sas7bdat files
@@ -166,8 +171,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   # Option 1: put the converted files in the same directory as the sas7bdat files
@@ -188,8 +194,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   # Option 1: put the converted files in the same directory as the sas7bdat files
@@ -210,8 +217,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * continue_on_error = If set to true processing of files in a batch will continue if there is a
   file conversion error instead of raising an exception. Default = False
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   # Option 1: put the converted files in the same directory as the sas7bdat files
@@ -229,8 +237,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * sas7bdat_file = the path and name for sas7bdat file to convert.
   * export_file = the path and name for the csv file. The csv file extension should be .csv.
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   sas7bdat_converter.to_csv('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.csv')
@@ -243,12 +252,14 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   be sent as either a string or Path objects.
   * sas7bdat_file = The path and name for sas7bdat file to convert.
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   sas7bdat_converter.to_dataframe('/path/to/sas7bdat/file/example.sas7bdat')
   ```
+
   **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
   `c:\path\to\sas7bdat\files\example_1.sas7bdat`.
 
@@ -257,8 +268,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * sas7bdat_file = the path and name for sas7bdat file to convert.
   * export_file = the path and name for the Excel file. The Excel file extension should be .xlsx.
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   sas7bdat_converter.to_excel('/path/to/sas7bdat/file/example.sas7bdat',
@@ -273,8 +285,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * sas7bdat_file = the path and name for sas7bdat file to convert.
   * export_file = the path and name for the json file. the json file extension should be .json.
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   sas7bdat_converter.to_json('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.json')
@@ -290,8 +303,9 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   * root_node = The name to uses for the top level node. If no name is supplied "root" will be used.
   * first_node = The name to use for the first node under root. If no name is supplied "item" will be used.
 
-  #### Example
-  ```
+  **Example**
+
+  ```py
   import sas7bdat_converter
 
   sas7bdat_converter.to_xml('/path/to/sas7bdat/file/example.sas7bdat', 'path/to/new/file/example.xml')
@@ -300,7 +314,6 @@ Excel files at once. File paths can be sent as either strings or Path objects.
   **Note:** Example uses Mac/Linux type file paths. For Windows use paths like
   `c:\path\to\sas7bdat\files\example.sas7bdat`.
 
-
-# Contributing
+## Contributing
 
 If you are interesting in contributing to this project please see our [contributing guide](CONTRIBUTING.md)
diff --git a/poetry.lock b/poetry.lock
index 3159624..69c80b8 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -427,7 +427,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
 
 [[package]]
 name = "tox"
-version = "3.21.0"
+version = "3.21.1"
 description = "tox is a generic virtualenv management and test command line tool"
 category = "dev"
 optional = false
@@ -466,7 +466,7 @@ python-versions = "*"
 
 [[package]]
 name = "virtualenv"
-version = "20.3.0"
+version = "20.3.1"
 description = "Virtual Python Environment builder"
 category = "dev"
 optional = false
@@ -817,8 +817,8 @@ toml = [
     {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
 ]
 tox = [
-    {file = "tox-3.21.0-py2.py3-none-any.whl", hash = "sha256:5efda30ad73e662c3844ac51ce1381bf28f61063773e06996aa8b6277133a7c0"},
-    {file = "tox-3.21.0.tar.gz", hash = "sha256:8cccede64802e78aa6c69f81051b25f0706639d1cbbb34d9366ce00c70ee054f"},
+    {file = "tox-3.21.1-py2.py3-none-any.whl", hash = "sha256:8a28facf65275c84b3bfde102afe24541d2ce02fd83ea07ce906537c3a74ed2d"},
+    {file = "tox-3.21.1.tar.gz", hash = "sha256:31379f2662393034203c5d6b2ebb7b86c67452cfc689784475c1c6e4a3cbc0cd"},
 ]
 typed-ast = [
     {file = "typed_ast-1.4.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:7703620125e4fb79b64aa52427ec192822e9f45d37d4b6625ab37ef403e1df70"},
@@ -858,8 +858,8 @@ typing-extensions = [
     {file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"},
 ]
 virtualenv = [
-    {file = "virtualenv-20.3.0-py2.py3-none-any.whl", hash = "sha256:205a7577275dd0d9223c730dd498e21a8910600085c3dee97412b041fc4b853b"},
-    {file = "virtualenv-20.3.0.tar.gz", hash = "sha256:7992b8de87e544a4ab55afc2240bf8388c4e3b5765d03784dad384bfdf9097ee"},
+    {file = "virtualenv-20.3.1-py2.py3-none-any.whl", hash = "sha256:14b34341e742bdca219e10708198e704e8a7064dd32f474fc16aca68ac53a306"},
+    {file = "virtualenv-20.3.1.tar.gz", hash = "sha256:0c111a2236b191422b37fe8c28b8c828ced39aab4bf5627fa5c331aeffb570d9"},
 ]
 zipp = [
     {file = "zipp-3.4.0-py3-none-any.whl", hash = "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108"},


Test patch:
diff --git a/tests/assets/expected_xpt/file1.csv b/tests/assets/expected_xpt/file1.csv
index 3563689..2e9f386 100644
--- a/tests/assets/expected_xpt/file1.csv
+++ b/tests/assets/expected_xpt/file1.csv
@@ -1,3 +1,3 @@
-"irow", "trow", "frow"
-1, "Some text", 1.5
-2, "Some more test", 17.23
+"irow","trow","frow"
+1.0,"Some text",1.5
+2.0,"Some more test",17.23
diff --git a/tests/assets/expected_xpt/file1.json b/tests/assets/expected_xpt/file1.json
index 5fd1503..bd04bd9 100644
--- a/tests/assets/expected_xpt/file1.json
+++ b/tests/assets/expected_xpt/file1.json
@@ -1,5 +1,5 @@
 {
-  "irow": [1, 2],
-  "trow": ["Some text", "Some more test"],
-  "frow": [1.5, 17.23]
+  "irow": {"0": 1.0, "1": 2.0},
+  "trow": {"0": "Some text", "1": "Some more test"},
+  "frow": {"0": 1.5, "1": 17.23}
 }
diff --git a/tests/assets/expected_xpt/file1.xlsx b/tests/assets/expected_xpt/file1.xlsx
index 1fe1ea0..30c9216 100644
Binary files a/tests/assets/expected_xpt/file1.xlsx and b/tests/assets/expected_xpt/file1.xlsx differ
diff --git a/tests/assets/expected_xpt/file1.xml b/tests/assets/expected_xpt/file1.xml
index 0233fc4..927a29d 100644
--- a/tests/assets/expected_xpt/file1.xml
+++ b/tests/assets/expected_xpt/file1.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <root>
   <item>
-    <irow>1</irow>
+    <irow>1.0</irow>
     <trow>Some text</trow>
     <frow>1.5</frow>
   </item>
   <item>
-    <irow>2</irow>
+    <irow>2.0</irow>
     <trow>Some more test</trow>
     <frow>17.23</frow>
   </item>
diff --git a/tests/assets/expected_xpt/file2.csv b/tests/assets/expected_xpt/file2.csv
index 6f7a632..7205af0 100644
--- a/tests/assets/expected_xpt/file2.csv
+++ b/tests/assets/expected_xpt/file2.csv
@@ -1,4 +1,4 @@
-"irow", "trow", "frow"
-3, "text 1", 21.50
-4, "text 2", 19.21
-5, "text 3", 42.42
+"irow","trow","frow"
+3.0,"text 1",21.5
+4.0,"text 2",19.21
+5.0,"text 3",42.42
diff --git a/tests/assets/expected_xpt/file2.json b/tests/assets/expected_xpt/file2.json
index f8435ab..3462696 100644
--- a/tests/assets/expected_xpt/file2.json
+++ b/tests/assets/expected_xpt/file2.json
@@ -1,5 +1,5 @@
 {
-  "irow": [3, 4, 5],
-  "trow": ["text 1", "text 2", "text 3"],
-  "frow": [21.50, 19.21, 42.42]
+  "irow": {"0": 3.0, "1": 4.0, "2": 5.0},
+  "trow": {"0": "text 1", "1": "text 2", "2": "text 3"},
+  "frow": {"0": 21.50, "1": 19.21, "2": 42.42}
 }
diff --git a/tests/assets/expected_xpt/file2.xlsx b/tests/assets/expected_xpt/file2.xlsx
index 9aa10b1..7bcd02c 100644
Binary files a/tests/assets/expected_xpt/file2.xlsx and b/tests/assets/expected_xpt/file2.xlsx differ
diff --git a/tests/assets/expected_xpt/file2.xml b/tests/assets/expected_xpt/file2.xml
index a060061..db6e556 100644
--- a/tests/assets/expected_xpt/file2.xml
+++ b/tests/assets/expected_xpt/file2.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <root>
   <item>
-    <irow>3</irow>
+    <irow>3.0</irow>
     <trow>text 1</trow>
-    <frow>21.50</frow>
+    <frow>21.5</frow>
   </item>
   <item>
-    <irow>4</irow>
+    <irow>4.0</irow>
     <trow>text 2</trow>
     <frow>19.21</frow>
   </item>
   <item>
-    <irow>5</irow>
+    <irow>5.0</irow>
     <trow>text 3</trow>
     <frow>42.42</frow>
   </item>
diff --git a/tests/test_sas7bdat_converter.py b/tests/test_sas7bdat_converter.py
index 6888061..ad118d5 100644
--- a/tests/test_sas7bdat_converter.py
+++ b/tests/test_sas7bdat_converter.py
@@ -1,4 +1,4 @@
-import filecmp
+import json
 import shutil
 from pathlib import Path
 from unittest.mock import patch
@@ -1586,44 +1586,94 @@ def test_is_valid_extension_true(data):
     assert converter._is_valid_extension(valid_extensions, file_extension)
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_csv_path_sas(tmp_path, request, expected_dir):
-    sas_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.csv")
-    expected_file = expected_dir.joinpath("file1.csv")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.csv"),
+        ("sas_file_2", "file2.csv"),
+        ("sas_file_3", "file3.csv"),
+    ],
+)
+def test_to_csv_path_sas(tmp_path, fixture_name, expected_name, expected_dir, request):
+    sas_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = expected_dir.joinpath(expected_name)
     converter.to_csv(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
 
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_csv_path_xpt(tmp_path, request, xpt_expected_dir):
-    xpt_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.csv")
-    expected_file = xpt_expected_dir.joinpath("file1.csv")
+    assert got == expected
+
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.csv"),
+        ("xpt_file_2", "file2.csv"),
+    ],
+)
+def test_to_csv_path_xpt(tmp_path, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     converter.to_csv(xpt_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
 
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_csv_str_sas(tmpdir, request, expected_dir):
-    sas_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.csv"))
-    expected_file = expected_dir.joinpath("file1.csv")
+    assert got == expected
+
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.csv"),
+        ("sas_file_2", "file2.csv"),
+        ("sas_file_3", "file3.csv"),
+    ],
+)
+def test_to_csv_str_sas(tmpdir, fixture_name, expected_name, request, expected_dir):
+    sas_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_csv(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
 
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_csv_str_xpt(tmpdir, request, xpt_expected_dir):
-    sas_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.csv"))
-    expected_file = xpt_expected_dir.joinpath("file1.csv")
+    assert got == expected
+
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.csv"),
+        ("xpt_file_2", "file2.csv"),
+    ],
+)
+def test_to_csv_str_xpt(tmpdir, fixture_name, expected_name, request, xpt_expected_dir):
+    sas_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_csv(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
+
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
+
+    assert got == expected
 
 
 def test_to_csv_invalid_extension():
@@ -1693,11 +1743,18 @@ def test_to_dataframe_xpt(xpt_file_1):
     pd.testing.assert_frame_equal(df, df_file)
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_excel_path_sas(tmp_path, request, expected_dir):
-    sas_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.xlsx")
-    expected_file = expected_dir.joinpath("file1.xlsx")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.xlsx"),
+        ("sas_file_2", "file2.xlsx"),
+        ("sas_file_3", "file3.xlsx"),
+    ],
+)
+def test_to_excel_path_sas(tmp_path, fixture_name, expected_name, request, expected_dir):
+    sas_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_excel(sas_file, converted_file)
 
     df_expected = pd.read_excel(expected_file, engine="openpyxl")
@@ -1706,11 +1763,17 @@ def test_to_excel_path_sas(tmp_path, request, expected_dir):
     pd.testing.assert_frame_equal(df_expected, df_converted)
 
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_excel_path_xpt(tmp_path, request, xpt_expected_dir):
-    xpt_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.xlsx")
-    expected_file = xpt_expected_dir.joinpath("file1.xlsx")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.xlsx"),
+        ("xpt_file_2", "file2.xlsx"),
+    ],
+)
+def test_to_excel_path_xpt(tmp_path, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_excel(xpt_file, converted_file)
 
     df_expected = pd.read_excel(expected_file, engine="openpyxl")
@@ -1719,11 +1782,18 @@ def test_to_excel_path_xpt(tmp_path, request, xpt_expected_dir):
     pd.testing.assert_frame_equal(df_expected, df_converted)
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_excel_str_sas(tmpdir, request, expected_dir):
-    sas_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.xlsx"))
-    expected_file = expected_dir.joinpath("file1.xlsx")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.xlsx"),
+        ("sas_file_2", "file2.xlsx"),
+        ("sas_file_3", "file3.xlsx"),
+    ],
+)
+def test_to_excel_str_sas(tmpdir, fixture_name, expected_name, request, expected_dir):
+    sas_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_excel(sas_file, converted_file)
 
     df_expected = pd.read_excel(expected_file, engine="openpyxl")
@@ -1732,11 +1802,17 @@ def test_to_excel_str_sas(tmpdir, request, expected_dir):
     pd.testing.assert_frame_equal(df_expected, df_converted)
 
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_excel_str_xpt(tmpdir, request, xpt_expected_dir):
-    xpt_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.xlsx"))
-    expected_file = xpt_expected_dir.joinpath("file1.xlsx")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.xlsx"),
+        ("xpt_file_2", "file2.xlsx"),
+    ],
+)
+def test_to_excel_str_xpt(tmpdir, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_excel(xpt_file, converted_file)
 
     df_expected = pd.read_excel(expected_file, engine="openpyxl")
@@ -1760,44 +1836,94 @@ def test_to_excel_invalid_extension():
     assert "sas7bdat conversion error - Valid extension" in str(execinfo.value)
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_json_path_sas(tmp_path, request, expected_dir):
-    sas_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.json")
-    expected_file = expected_dir.joinpath("file1.json")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.json"),
+        ("sas_file_2", "file2.json"),
+        ("sas_file_3", "file3.json"),
+    ],
+)
+def test_to_json_path_sas(tmp_path, fixture_name, expected_name, request, expected_dir):
+    sas_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_json(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = json.load(f)
 
+    with open(converted_file, "r") as f:
+        got = json.load(f)
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_json_path_xpt(tmp_path, request, xpt_expected_dir):
-    xpt_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.json")
-    expected_file = xpt_expected_dir.joinpath("file1.json")
+    assert got == expected
+
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.json"),
+        ("xpt_file_2", "file2.json"),
+    ],
+)
+def test_to_json_path_xpt(tmp_path, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_json(xpt_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = json.load(f)
+
+    with open(converted_file, "r") as f:
+        got = json.load(f)
 
+    assert got == expected
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_json_str_sas(tmpdir, request, expected_dir):
-    sas_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.json"))
-    expected_file = expected_dir.joinpath("file1.json")
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.json"),
+        ("sas_file_2", "file2.json"),
+        ("sas_file_3", "file3.json"),
+    ],
+)
+def test_to_json_str_sas(tmpdir, fixture_name, expected_name, request, expected_dir):
+    sas_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_json(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = json.load(f)
+
+    with open(converted_file, "r") as f:
+        got = json.load(f)
 
+    assert got == expected
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_json_str_xpt(tmpdir, request, xpt_expected_dir):
-    xpt_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.json"))
-    expected_file = xpt_expected_dir.joinpath("file1.json")
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.json"),
+        ("xpt_file_2", "file2.json"),
+    ],
+)
+def test_to_json_str_xpt(tmpdir, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_json(xpt_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = json.load(f)
+
+    with open(converted_file, "r") as f:
+        got = json.load(f)
+
+    assert got == expected
 
 
 def test_to_json_invalid_extension():
@@ -1807,44 +1933,94 @@ def test_to_json_invalid_extension():
     assert "sas7bdat conversion error - Valid extension" in str(execinfo.value)
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_xml_path_sas(tmp_path, request, expected_dir):
-    sas_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.xml")
-    expected_file = expected_dir.joinpath("file1.xml")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.xml"),
+        ("sas_file_2", "file2.xml"),
+        ("sas_file_3", "file3.xml"),
+    ],
+)
+def test_to_xml_path_sas(tmp_path, fixture_name, expected_name, expected_dir, request):
+    sas_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_xml(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
 
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_xml_path_xpt(tmp_path, request, xpt_expected_dir):
-    xpt_file = Path(request.getfixturevalue(request.param))
-    converted_file = tmp_path.joinpath("file1.xml")
-    expected_file = xpt_expected_dir.joinpath("file1.xml")
+    assert got == expected
+
+
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.xml"),
+        ("xpt_file_2", "file2.xml"),
+    ],
+)
+def test_to_xml_path_xpt(tmp_path, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = Path(request.getfixturevalue(fixture_name))
+    converted_file = tmp_path.joinpath(expected_name)
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_xml(xpt_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
+
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
+
+    assert got == expected
 
 
-@pytest.fixture(params=["sas_file_1", "sas_file_2", "sas_file_3"])
-def test_to_xml_str_sas(tmpdir, request, expected_dir):
-    sas_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.xml"))
-    expected_file = expected_dir.joinpath("file1.xml")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("sas_file_1", "file1.xml"),
+        ("sas_file_2", "file2.xml"),
+        ("sas_file_3", "file3.xml"),
+    ],
+)
+def test_to_xml_str_sas(tmpdir, fixture_name, expected_name, request, expected_dir):
+    sas_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_xml(sas_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
+
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
+
+    assert got == expected
 
 
-@pytest.fixture(params=["xpt_file_1", "xpt_file_2"])
-def test_to_xml_str_xpt(tmpdir, request, xpt_expected_dir):
-    xpt_file = request.getfixturevalue(request.param)
-    converted_file = str(Path(tmpdir).joinpath("file1.xml"))
-    expected_file = xpt_expected_dir.joinpath("file1.xml")
+@pytest.mark.parametrize(
+    "fixture_name, expected_name",
+    [
+        ("xpt_file_1", "file1.xml"),
+        ("xpt_file_2", "file2.xml"),
+    ],
+)
+def test_to_xml_str_xpt(tmpdir, fixture_name, expected_name, request, xpt_expected_dir):
+    xpt_file = request.getfixturevalue(fixture_name)
+    converted_file = str(Path(tmpdir).joinpath(expected_name))
+    expected_file = xpt_expected_dir.joinpath(expected_name)
     sas7bdat_converter.to_xml(xpt_file, converted_file)
 
-    assert filecmp.cmp(converted_file, expected_file, shallow=False)
+    with open(expected_file, "r") as f:
+        expected = f.read().rstrip()
+
+    with open(converted_file, "r") as f:
+        got = f.read().rstrip()
+
+    assert got == expected
 
 
 def test_to_xml_invalid_extension():