From 260f5bae7091bab2383fa71c9034c3bde33e6f02 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 26 Oct 2008 20:33:19 +0000 Subject: add forgotten test for r67030 --- Lib/test/test_future5.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Lib/test/test_future5.py diff --git a/Lib/test/test_future5.py b/Lib/test/test_future5.py new file mode 100644 index 0000000..1e1a930 --- /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) -- cgit v0.12