From bbced489a11c019f839b9acf24e18817df719424 Mon Sep 17 00:00:00 2001 From: Jakub Pavlik Date: Sun, 11 Jun 2023 19:34:28 +0200 Subject: [PATCH] tests: make sure that required directory exists --- tests/test_cantus_examples.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_cantus_examples.py b/tests/test_cantus_examples.py index e646656..8ae128c 100644 --- a/tests/test_cantus_examples.py +++ b/tests/test_cantus_examples.py @@ -11,6 +11,16 @@ from chant21.cantus import convertCantusData class TestCantusExamplesConversion(unittest.TestCase): + _tmp_dir = 'tmp/cantus-html' + + def setUp(self): + os.makedirs(self._tmp_dir, exist_ok=True) + + def tearDown(self): + dir = self._tmp_dir + for i in os.listdir(dir): + os.remove(os.path.join(dir, i)) + def test_parse_volpiano_examples(self): """Test whether the volpiano of all Cantus examples can be parsed""" examples = pd.read_csv('chant21/examples/cantus-volpiano-examples.csv', index_col=0)