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

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

Issue 3754: cross-compilation support for python build
Left Patch Set: Created 1 year, 8 months ago
Right Patch Set: Created 11 months, 2 weeks 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/test/test_sysconfig.py ('k') | Makefile.pre.in » ('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 scripts in the Tools directory. 1 """Tests for scripts in the Tools directory.
2 2
3 This file contains regression tests for some of the scripts found in the 3 This file contains regression tests for some of the scripts found in the
4 Tools directory of a Python checkout or tarball, such as reindent.py. 4 Tools directory of a Python checkout or tarball, such as reindent.py.
5 """ 5 """
6 6
7 import os 7 import os
8 import sys 8 import sys
9 import importlib.machinery 9 import importlib.machinery
10 import unittest 10 import unittest
11 from unittest import mock 11 from unittest import mock
12 import sysconfig 12 import sysconfig
13 import tempfile 13 import tempfile
14 from test import support 14 from test import support
15 from test.script_helper import assert_python_ok 15 from test.script_helper import assert_python_ok
16 16
17 if not sysconfig.is_python_build(): 17 if not sysconfig.is_python_build():
18 # XXX some installers do contain the tools, should we detect that 18 # XXX some installers do contain the tools, should we detect that
19 # and run the tests in that case too? 19 # and run the tests in that case too?
20 raise unittest.SkipTest('test irrelevant for an installed Python') 20 raise unittest.SkipTest('test irrelevant for an installed Python')
21 21
22 srcdir = sysconfig.get_config_var('projectbase') 22 srcdir = sysconfig.get_config_var('srcdir')
23 basepath = os.path.join(os.getcwd(), srcdir, 'Tools') 23 basepath = os.path.join(os.getcwd(), srcdir, 'Tools')
24 scriptsdir = os.path.join(basepath, 'scripts') 24 scriptsdir = os.path.join(basepath, 'scripts')
25 25
26 26
27 class ReindentTests(unittest.TestCase): 27 class ReindentTests(unittest.TestCase):
28 script = os.path.join(scriptsdir, 'reindent.py') 28 script = os.path.join(scriptsdir, 'reindent.py')
29 29
30 def test_noargs(self): 30 def test_noargs(self):
31 assert_python_ok(self.script) 31 assert_python_ok(self.script)
32 32
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 from test_unparse import UnparseTestCase 129 from test_unparse import UnparseTestCase
130 130
131 131
132 def test_main(): 132 def test_main():
133 support.run_unittest(*[obj for obj in globals().values() 133 support.run_unittest(*[obj for obj in globals().values()
134 if isinstance(obj, type)]) 134 if isinstance(obj, type)])
135 135
136 136
137 if __name__ == '__main__': 137 if __name__ == '__main__':
138 unittest.main() 138 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7