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

Delta Between Two Patch Sets: Lib/test/test_filecmp.py

Issue 16510: Using appropriate checks in tests
Left Patch Set: Created 5 years, 9 months ago
Right Patch Set: Created 5 years, 6 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_faulthandler.py ('k') | Lib/test/test_fnmatch.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 import os, filecmp, shutil, tempfile 1 import os, filecmp, shutil, tempfile
2 import unittest 2 import unittest
3 from test import support 3 from test import support
4 4
5 class FileCompareTestCase(unittest.TestCase): 5 class FileCompareTestCase(unittest.TestCase):
6 def setUp(self): 6 def setUp(self):
7 self.name = support.TESTFN 7 self.name = support.TESTFN
8 self.name_same = support.TESTFN + '-same' 8 self.name_same = support.TESTFN + '-same'
9 self.name_diff = support.TESTFN + '-diff' 9 self.name_diff = support.TESTFN + '-diff'
10 data = 'Contents of file go here.\n' 10 data = 'Contents of file go here.\n'
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 d = filecmp.dircmp(self.dir, self.dir_diff) 145 d = filecmp.dircmp(self.dir, self.dir_diff)
146 self.assertEqual(d.same_files, ['file']) 146 self.assertEqual(d.same_files, ['file'])
147 self.assertEqual(d.diff_files, ['file2']) 147 self.assertEqual(d.diff_files, ['file2'])
148 148
149 149
150 def test_main(): 150 def test_main():
151 support.run_unittest(FileCompareTestCase, DirCompareTestCase) 151 support.run_unittest(FileCompareTestCase, DirCompareTestCase)
152 152
153 if __name__ == "__main__": 153 if __name__ == "__main__":
154 test_main() 154 test_main()
LEFTRIGHT

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