diff options
Diffstat (limited to 'tests.py')
-rw-r--r-- | tests.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |