diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-04-12 17:04:39 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-04-12 17:04:39 (GMT) |
commit | 865a714ac07d2ec7eebc83be39d17f7c90ed940c (patch) | |
tree | de88d6bdd4da0221f6923b641cca23b25eef71ab /Lib/distutils/tests | |
parent | bccb0c928f84c893ed58af649658267e674e864f (diff) | |
download | cpython-865a714ac07d2ec7eebc83be39d17f7c90ed940c.zip cpython-865a714ac07d2ec7eebc83be39d17f7c90ed940c.tar.gz cpython-865a714ac07d2ec7eebc83be39d17f7c90ed940c.tar.bz2 |
Merged revisions 71533 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71533 | tarek.ziade | 2009-04-12 19:02:08 +0200 (Sun, 12 Apr 2009) | 1 line
removed string usage and added a test for _clean
........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_config_cmd.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py index 45d480b..f5c09e4 100644 --- a/Lib/distutils/tests/test_config_cmd.py +++ b/Lib/distutils/tests/test_config_cmd.py @@ -60,6 +60,24 @@ class ConfigTestCase(support.LoggingSilencer, self.assertEquals(cmd.libraries, ['one']) self.assertEquals(cmd.library_dirs, ['three', 'four']) + def test_clean(self): + # _clean removes files + tmp_dir = self.mkdtemp() + f1 = os.path.join(tmp_dir, 'one') + f2 = os.path.join(tmp_dir, 'two') + + self.write_file(f1, 'xxx') + self.write_file(f2, 'xxx') + + for f in (f1, f2): + self.assert_(os.path.exists(f)) + + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._clean(f1, f2) + + for f in (f1, f2): + self.assert_(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) |