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

Delta Between Two Patch Sets: Lib/distutils/tests/test_config_cmd.py

Issue 3871: cross and native build of python for mingw32 with distutils
Left Patch Set: Created 9 years, 6 months ago
Right Patch Set: Created 7 years, 2 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:
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/distutils/tests/test_bdist.py ('k') | Lib/distutils/tests/test_cygwinccompiler.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
(no file at all)
1 """Tests for distutils.command.config.""" 1 """Tests for distutils.command.config."""
2 import unittest 2 import unittest
3 import os 3 import os
4 import sys 4 import sys
5 from test.support import run_unittest 5 from test.support import run_unittest
6 6
7 from distutils.command.config import dump_file, config 7 from distutils.command.config import dump_file, config
8 from distutils.tests import support 8 from distutils.tests import support
9 from distutils import log 9 from distutils import log
10 10
(...skipping 20 matching lines...) Expand all
31 f = open(this_file) 31 f = open(this_file)
32 try: 32 try:
33 numlines = len(f.readlines()) 33 numlines = len(f.readlines())
34 finally: 34 finally:
35 f.close() 35 f.close()
36 36
37 dump_file(this_file, 'I am the header') 37 dump_file(this_file, 'I am the header')
38 self.assertEqual(len(self._logs), numlines+1) 38 self.assertEqual(len(self._logs), numlines+1)
39 39
40 def test_search_cpp(self): 40 def test_search_cpp(self):
41 # TODO: mingw host ?
41 if sys.platform == 'win32': 42 if sys.platform == 'win32':
42 return 43 return
43 pkg_dir, dist = self.create_dist() 44 pkg_dir, dist = self.create_dist()
44 cmd = config(dist) 45 cmd = config(dist)
45 46
46 # simple pattern searches 47 # simple pattern searches
47 match = cmd.search_cpp(pattern='xxx', body='/* xxx */') 48 match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
48 self.assertEqual(match, 0) 49 self.assertEqual(match, 0)
49 50
50 match = cmd.search_cpp(pattern='_configtest', body='/* xxx */') 51 match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
(...skipping 30 matching lines...) Expand all
81 cmd._clean(f1, f2) 82 cmd._clean(f1, f2)
82 83
83 for f in (f1, f2): 84 for f in (f1, f2):
84 self.assertTrue(not os.path.exists(f)) 85 self.assertTrue(not os.path.exists(f))
85 86
86 def test_suite(): 87 def test_suite():
87 return unittest.makeSuite(ConfigTestCase) 88 return unittest.makeSuite(ConfigTestCase)
88 89
89 if __name__ == "__main__": 90 if __name__ == "__main__":
90 run_unittest(test_suite()) 91 run_unittest(test_suite())
LEFTRIGHT

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