ยปCore Development>Code coverage>Lib/test/test_tools/test_reindent.py

Python code coverage for Lib/test/test_tools/test_reindent.py

#countcontent
1n/a"""Tests for scripts in the Tools directory.
2n/a
3n/aThis file contains regression tests for some of the scripts found in the
4n/aTools directory of a Python checkout or tarball, such as reindent.py.
5n/a"""
6n/a
7n/aimport os
8n/aimport unittest
9n/afrom test.support.script_helper import assert_python_ok
10n/a
11n/afrom test.test_tools import scriptsdir, skip_if_missing
12n/a
13n/askip_if_missing()
14n/a
15n/aclass ReindentTests(unittest.TestCase):
16n/a script = os.path.join(scriptsdir, 'reindent.py')
17n/a
18n/a def test_noargs(self):
19n/a assert_python_ok(self.script)
20n/a
21n/a def test_help(self):
22n/a rc, out, err = assert_python_ok(self.script, '-h')
23n/a self.assertEqual(out, b'')
24n/a self.assertGreater(err, b'')
25n/a
26n/a
27n/aif __name__ == '__main__':
28n/a unittest.main()