summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-10-26 16:11:17 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2016-10-26 16:11:17 +0200
commitdbb8ddef7226f8e61e40f27e1d276d328fb8d4f6 (patch)
treed51a9f9de39de5b1fb4aed33d1cb7afb48f08062 /psutil
parenta2d63e0df2a3659b32e3e3360d410e8104cdb873 (diff)
downloadpsutil-dbb8ddef7226f8e61e40f27e1d276d328fb8d4f6.tar.gz
testing make clean with unittests was a bad idea after all
Diffstat (limited to 'psutil')
-rwxr-xr-xpsutil/tests/test_misc.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py
index 3d4d5cfc..d5a1bcee 100755
--- a/psutil/tests/test_misc.py
+++ b/psutil/tests/test_misc.py
@@ -442,56 +442,6 @@ class TestScripts(unittest.TestCase):
# ===================================================================
-# --- Makefile tests
-# ===================================================================
-
-
-@unittest.skipIf(not POSIX, "POSIX only")
-class TestMakefile(unittest.TestCase):
-
- def setUp(self):
- self.paths = set()
-
- def tearDown(self):
- for path in self.paths:
- safe_rmpath(path)
-
- def touch(self, path):
- with open(path, 'w'):
- pass
- self.paths.add(path)
-
- def mkdir(self, path):
- safe_mkdir(path)
- self.paths.add(path)
-
- def test_clean(self):
- with chdir(ROOT_DIR):
- self.touch("foo.pyc")
- self.touch("foo.pyo")
- self.touch("psutil/wow.so")
- self.touch("psutil/arch/hello.~")
- self.touch("psutil/arch/apple.orig")
- self.touch("psutil/arch/apple.bak")
- self.touch("psutil/arch/apple.rej")
- self.mkdir("__pycache__")
- sh("make clean")
- for path in self.paths:
- assert not os.path.exists(path), path
-
- def test_clean_files_from_dir(self):
- # make sure a dir with .pyc in its name is not deleted
- with chdir(ROOT_DIR):
- safe_mkdir('foo.pyd')
- safe_mkdir('foo.bak')
- self.addCleanup(safe_rmpath, 'foo.pyd')
- self.addCleanup(safe_rmpath, 'foo.bak')
- sh("make clean")
- assert os.path.exists('foo.pyd')
- assert os.path.exists('foo.bak')
-
-
-# ===================================================================
# --- Unit tests for test utilities.
# ===================================================================