File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
33from shutil import rmtree
44
55from unittest import TestCase , main
1111class 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 ):
You can’t perform that action at this time.
0 commit comments