diff options
author | Rich Trott <rtrott@gmail.com> | 2015-06-02 20:44:03 -0700 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-06-12 10:27:29 +1000 |
commit | a6b8ee19b85bbd798510191f0aee596f36b909d2 (patch) | |
tree | 7436e04a7f7efc206434fe231c9fac446aebb6c5 /test/testpy | |
parent | 6e4d30286d7305335b14762271a25f5dbc5c63c0 (diff) | |
download | node-new-a6b8ee19b85bbd798510191f0aee596f36b909d2.tar.gz |
test: create temp dir in common.js
Move creation of temporary directories for tests
out of the Python harness and into common.js. This
allows all tests to be run reliably outside of the
Python wrapper.
PR-URL: https://github.com/nodejs/io.js/pull/1877
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'test/testpy')
-rw-r--r-- | test/testpy/__init__.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py index a1b89898fe..5933f8b9b6 100644 --- a/test/testpy/__init__.py +++ b/test/testpy/__init__.py @@ -28,7 +28,6 @@ import test import os import shutil -from shutil import rmtree from os import mkdir from glob import glob from os.path import join, dirname, exists @@ -50,35 +49,6 @@ class SimpleTestCase(test.TestCase): self.tmpdir = join(dirname(self.config.root), 'tmp') self.additional_flags = additional - def GetTmpDir(self): - return "%s.%d" % (self.tmpdir, self.thread_id) - - - def AfterRun(self, result): - # delete the whole tmp dir - try: - rmtree(self.GetTmpDir()) - except: - pass - # make it again. - try: - mkdir(self.GetTmpDir()) - except: - pass - - def BeforeRun(self): - # delete the whole tmp dir - try: - rmtree(self.GetTmpDir()) - except: - pass - # make it again. - # intermittently fails on win32, so keep trying - while not os.path.exists(self.GetTmpDir()): - try: - mkdir(self.GetTmpDir()) - except: - pass def GetLabel(self): return "%s %s" % (self.mode, self.GetName()) |