diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2014-07-16 19:26:09 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2014-07-16 19:26:09 (GMT) |
commit | 2b0a6102974bdcacf8b8c4d964d3f7379878100a (patch) | |
tree | 2a18ee067b685b0a7af77e1d1b2f52138a996fa4 /Lib/test/test_tools/test_reindent.py | |
parent | 52b2bc03693d663fe1d1bdf974c23800232213dd (diff) | |
download | cpython-2b0a6102974bdcacf8b8c4d964d3f7379878100a.zip cpython-2b0a6102974bdcacf8b8c4d964d3f7379878100a.tar.gz cpython-2b0a6102974bdcacf8b8c4d964d3f7379878100a.tar.bz2 |
Issue #21918: Convert test_tools.py to a sub-package of test.
Diffstat (limited to 'Lib/test/test_tools/test_reindent.py')
-rw-r--r-- | Lib/test/test_tools/test_reindent.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Lib/test/test_tools/test_reindent.py b/Lib/test/test_tools/test_reindent.py new file mode 100644 index 0000000..45cebf7 --- /dev/null +++ b/Lib/test/test_tools/test_reindent.py @@ -0,0 +1,28 @@ +"""Tests for scripts in the Tools directory. + +This file contains regression tests for some of the scripts found in the +Tools directory of a Python checkout or tarball, such as reindent.py. +""" + +import os +import unittest +from test.script_helper import assert_python_ok + +from test.test_tools import scriptsdir, skip_if_missing + +skip_if_missing() + +class ReindentTests(unittest.TestCase): + script = os.path.join(scriptsdir, 'reindent.py') + + def test_noargs(self): + assert_python_ok(self.script) + + def test_help(self): + rc, out, err = assert_python_ok(self.script, '-h') + self.assertEqual(out, b'') + self.assertGreater(err, b'') + + +if __name__ == '__main__': + unittest.main() |