diff options
author | emkael <emkael@tlen.pl> | 2020-10-20 14:37:13 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-10-20 14:37:13 +0200 |
commit | d170916f04a535d9e72ff453b18bbd351e356b7c (patch) | |
tree | 60fc0085ba8c748b91bc3d142dc79c086da4246e /tests.py | |
parent | 34ce719920a7b25ec3183ee4a9ee1af5e59e72b3 (diff) |
Test output goes into a known path, instead of temp (for easier inspection)
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) |