Skip to content

Commit 2f40947

Browse files
committed
Another try at fixing tests for python 2.6 #21
1 parent de5d1b7 commit 2f40947

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Diff for: tmuxp/testsuite/test_config.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@
5555

5656
class ImportExportTest(TestCase):
5757

58-
@classmethod
59-
def setUpClass(cls):
60-
cls.tmp_dir = tempfile.mkdtemp(suffix='tmuxp')
58+
def setUp(self):
59+
self.tmp_dir = tempfile.mkdtemp(suffix='tmuxp')
6160

62-
return cls
61+
def tearDown(self):
62+
if os.path.isdir(self.tmp_dir):
63+
shutil.rmtree(self.tmp_dir)
64+
logging.debug('wiped %s' % TMUXP_DIR)
6365

6466
def test_export_json(self):
6567
json_config_file = os.path.join(self.tmp_dir, 'config.json')
@@ -124,12 +126,6 @@ def test_scan_config(self):
124126

125127
self.assertEqual(len(configs), files)
126128

127-
@classmethod
128-
def tearDownClass(cls):
129-
if os.path.isdir(cls.tmp_dir):
130-
shutil.rmtree(cls.tmp_dir)
131-
logging.debug('wiped %s' % TMUXP_DIR)
132-
133129

134130
class ExpandTest(TestCase):
135131

0 commit comments

Comments
 (0)