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

Delta Between Two Patch Sets: Lib/distutils/tests/test_cygwinccompiler.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_config_cmd.py ('k') | Lib/distutils/unixccompiler.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.cygwinccompiler.""" 1 """Tests for distutils.cygwinccompiler."""
2 import unittest 2 import unittest
3 import sys 3 import sys
4 import os 4 import os
5 from io import BytesIO 5 from io import BytesIO
6 import subprocess 6 import subprocess
7 from test.support import run_unittest 7 from test.support import run_unittest
8 8
9 from distutils import cygwinccompiler 9 from distutils import cygwinccompiler
10 from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, 10 from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 self.assertEqual(str(res[2]), '2.17.50') 114 self.assertEqual(str(res[2]), '2.17.50')
115 self._exes['dllwrap'] = b'Cheese Wrap' 115 self._exes['dllwrap'] = b'Cheese Wrap'
116 res = get_versions() 116 res = get_versions()
117 self.assertEqual(res[2], None) 117 self.assertEqual(res[2], None)
118 118
119 def test_get_msvcr(self): 119 def test_get_msvcr(self):
120 120
121 # none 121 # none
122 sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' 122 sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) '
123 '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') 123 '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]')
124 self.assertEqual(get_msvcr(), None) 124 self.assertEqual(get_msvcr(), [])
125 125
126 # MSVC 7.0 126 # MSVC 7.0
127 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' 127 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
128 '[MSC v.1300 32 bits (Intel)]') 128 '[MSC v.1300 32 bits (Intel)]')
129 self.assertEqual(get_msvcr(), ['msvcr70']) 129 self.assertEqual(get_msvcr(), ['msvcr70'])
130 130
131 # MSVC 7.1 131 # MSVC 7.1
132 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' 132 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
133 '[MSC v.1310 32 bits (Intel)]') 133 '[MSC v.1310 32 bits (Intel)]')
134 self.assertEqual(get_msvcr(), ['msvcr71']) 134 self.assertEqual(get_msvcr(), ['msvcr71'])
(...skipping 11 matching lines...) Expand all
146 # unknown 146 # unknown
147 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' 147 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) '
148 '[MSC v.1999 32 bits (Intel)]') 148 '[MSC v.1999 32 bits (Intel)]')
149 self.assertRaises(ValueError, get_msvcr) 149 self.assertRaises(ValueError, get_msvcr)
150 150
151 def test_suite(): 151 def test_suite():
152 return unittest.makeSuite(CygwinCCompilerTestCase) 152 return unittest.makeSuite(CygwinCCompilerTestCase)
153 153
154 if __name__ == '__main__': 154 if __name__ == '__main__':
155 run_unittest(test_suite()) 155 run_unittest(test_suite())
LEFTRIGHT

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