tests/conftest.py
raw| 1 | from os.path import dirname, realpath, join |
| 2 | import shutil |
| 3 | |
| 4 | import pytest |
| 5 | |
| 6 | |
| 7 | @pytest.fixture |
| 8 | def src_dir(): |
| 9 | return join( |
| 10 | dirname(realpath(__file__)), 'datasets' |
| 11 | ) |
| 12 | |
| 13 | |
| 14 | @pytest.fixture |
| 15 | def expected_dir(): |
| 16 | return join( |
| 17 | dirname(realpath(__file__)), 'expected' |
| 18 | ) |
| 19 | |
| 20 | |
| 21 | @pytest.fixture(scope="session") |
| 22 | def output_dir(): |
| 23 | out_dir = realpath(join(dirname(realpath(__file__)), '..', 'output')) |
| 24 | shutil.rmtree(out_dir, ignore_errors=True) |
| 25 | return out_dir |