[Python-checkins] r71535 - in python/branches/py3k: Lib/distutils/tests/test_config_cmd.py

tarek.ziade python-checkins at python.org
Sun Apr 12 19:04:40 CEST 2009


Author: tarek.ziade
Date: Sun Apr 12 19:04:39 2009
New Revision: 71535
Log:
Merged revisions 71533 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r71533 | tarek.ziade | 2009年04月12日 19:02:08 +0200 (2009年4月12日) | 1 line
 
 removed string usage and added a test for _clean
........
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Lib/distutils/tests/test_config_cmd.py
Modified: python/branches/py3k/Lib/distutils/tests/test_config_cmd.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_config_cmd.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_config_cmd.py	Sun Apr 12 19:04:39 2009
@@ -60,6 +60,24 @@
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /