Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23504)

Side by Side Diff: Lib/distutils/tests/test_clean.py

Issue 19600: Use specific asserts in distutils tests
Patch Set: Created 5 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/distutils/tests/test_build_scripts.py ('k') | Lib/distutils/tests/test_config_cmd.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """Tests for distutils.command.clean.""" 1 """Tests for distutils.command.clean."""
2 import sys 2 import sys
3 import os 3 import os
4 import unittest 4 import unittest
5 import getpass 5 import getpass
6 6
7 from distutils.command.clean import clean 7 from distutils.command.clean import clean
8 from distutils.tests import support 8 from distutils.tests import support
9 from test.support import run_unittest 9 from test.support import run_unittest
10 10
(...skipping 18 matching lines...) Expand all
29 for f in ('one', 'two', 'three'): 29 for f in ('one', 'two', 'three'):
30 self.write_file(os.path.join(path, f)) 30 self.write_file(os.path.join(path, f))
31 31
32 # let's run the command 32 # let's run the command
33 cmd.all = 1 33 cmd.all = 1
34 cmd.ensure_finalized() 34 cmd.ensure_finalized()
35 cmd.run() 35 cmd.run()
36 36
37 # make sure the files where removed 37 # make sure the files where removed
38 for name, path in dirs: 38 for name, path in dirs:
39 self.assertTrue(not os.path.exists(path), 39 self.assertFalse(os.path.exists(path),
40 '%s was not removed' % path) 40 '%s was not removed' % path)
ezio.melotti 2013/11/16 22:56:04 You could fix the indentation of this line while y
storchaka 2013/11/16 23:37:47 Sorry, I missed this comment. I hadn't fixed the
41 41
42 # let's run the command again (should spit warnings but succeed) 42 # let's run the command again (should spit warnings but succeed)
43 cmd.all = 1 43 cmd.all = 1
44 cmd.ensure_finalized() 44 cmd.ensure_finalized()
45 cmd.run() 45 cmd.run()
46 46
47 def test_suite(): 47 def test_suite():
48 return unittest.makeSuite(cleanTestCase) 48 return unittest.makeSuite(cleanTestCase)
49 49
50 if __name__ == "__main__": 50 if __name__ == "__main__":
51 run_unittest(test_suite()) 51 run_unittest(test_suite())
OLDNEW
« no previous file with comments | « Lib/distutils/tests/test_build_scripts.py ('k') | Lib/distutils/tests/test_config_cmd.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+