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