Skip to content

Commit d9f6019

Browse files
committed
directories in test
1 parent 1e6aa1e commit d9f6019

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/test_per_category.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from os import makedirs, listdir, rmdir
2-
from os.path import exists, join
1+
from os import makedirs, listdir
2+
from os.path import join, dirname, realpath
33
from shutil import rmtree
44

55
from unittest import TestCase, main
@@ -11,7 +11,9 @@
1111
class PerCategoryTests(TestCase):
1212
def setUp(self):
1313
# Make expected directory structure
14-
makedirs('../agp_processing/10-populated-templates/taxa')
14+
currpath = dirname(realpath(__file__))
15+
self.dirpath = join(currpath, '../agp_processing/10-populated-templates/taxa')
16+
makedirs(self.dirpath)
1517
self.path = agenv.paths['collapsed']['notrim']['1k']
1618
agenv.paths['collapsed']['notrim']['1k'] = \
1719
{'ag-biom':
@@ -22,7 +24,7 @@ def setUp(self):
2224
'../tests/data/ag_testing/ag-oral-flossing.biom'}
2325

2426
def tearDown(self):
25-
rmtree('../agp_processing', ignore_errors=True)
27+
rmtree(self.dirpath, ignore_errors=True)
2628
agenv.paths['collapsed']['notrim']['1k'] = self.path
2729

2830
def test_cat_taxa_summaries(self):

0 commit comments

Comments
 (0)