summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/tmp/.gitignore1
-rw-r--r--tests.py7
2 files changed, 5 insertions, 3 deletions
diff --git a/test/tmp/.gitignore b/test/tmp/.gitignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/test/tmp/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/tests.py b/tests.py
index 4e9b8ee..3f7e4c5 100644
--- a/tests.py
+++ b/tests.py
@@ -8,7 +8,7 @@ from dealconvert import DealConverter
import pytest
-formats = ['ber', 'bhg', 'bri', 'cds', 'csv', 'dge', 'dlm', 'dup', 'lin', 'pbn', 'rzd']
+formats = ['ber', 'bhg', 'bri', 'rzd', 'cds', 'csv', 'dge', 'dlm', 'dup', 'lin', 'pbn']
format_files = ['test.' + f for f in formats] + ['test-jfr.pbn']
test_data = [(d[0], d[1], d[1] == 'test-jfr.pbn') for d in itertools.product(format_files, format_files)]
@@ -16,9 +16,10 @@ test_data = [(d[0], d[1], d[1] == 'test-jfr.pbn') for d in itertools.product(for
@pytest.mark.parametrize("input_file, output_file, jfr_only", test_data)
def test_conversion(input_file, output_file, jfr_only):
input_path = os.path.join(os.path.dirname(__file__), 'test', input_file)
- output_path = os.path.join(tempfile.mkdtemp(), output_file)
+ output_path = os.path.join(os.path.dirname(__file__), 'test', 'tmp', output_file)
ref_path = os.path.join(os.path.dirname(__file__), 'test', output_file)
- print(input_path, output_path, ref_path)
+ if os.path.exists(output_path):
+ os.remove(output_path)
converter = DealConverter(
input_path,
jfr_only=jfr_only)