diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-26 20:33:19 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-26 20:33:19 +0000 |
commit | 260f5bae7091bab2383fa71c9034c3bde33e6f02 (patch) | |
tree | dd28a38fccec62e8ec2ded96933303bb71848d90 /Lib/test/test_future5.py | |
parent | bdca942ffcdb6e14758d3e2f7a9e9fbbfa931c06 (diff) | |
download | cpython-git-260f5bae7091bab2383fa71c9034c3bde33e6f02.tar.gz |
add forgotten test for r67030
Diffstat (limited to 'Lib/test/test_future5.py')
-rw-r--r-- | Lib/test/test_future5.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Lib/test/test_future5.py b/Lib/test/test_future5.py new file mode 100644 index 0000000000..1e1a930313 --- /dev/null +++ b/Lib/test/test_future5.py @@ -0,0 +1,21 @@ +# Check that multiple features can be enabled. +from __future__ import unicode_literals, print_function + +import sys +import unittest +from . import test_support + + +class TestMultipleFeatures(unittest.TestCase): + + def test_unicode_literals(self): + self.assertTrue(isinstance("", unicode)) + + def test_print_function(self): + with test_support.captured_output("stderr") as s: + print("foo", file=sys.stderr) + self.assertEqual(s.getvalue(), "foo\n") + + +def test_main(): + test_support.run_unittest(TestMultipleFeatures) |