Skip to content

Commit

Permalink
directories in test
Browse files Browse the repository at this point in the history
  • Loading branch information
squirrelo committed May 4, 2016
1 parent 1e6aa1e commit d9f6019
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_per_category.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os import makedirs, listdir, rmdir
from os.path import exists, join
from os import makedirs, listdir
from os.path import join, dirname, realpath
from shutil import rmtree

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

def tearDown(self):
rmtree('../agp_processing', ignore_errors=True)
rmtree(self.dirpath, ignore_errors=True)
agenv.paths['collapsed']['notrim']['1k'] = self.path

def test_cat_taxa_summaries(self):
Expand Down

0 comments on commit d9f6019

Please sign in to comment.