]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add forgotten test for r67030
authorBenjamin Peterson <benjamin@python.org>
Sun, 26 Oct 2008 20:33:19 +0000 (20:33 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 26 Oct 2008 20:33:19 +0000 (20:33 +0000)
Lib/test/test_future5.py [new file with mode: 0644]

diff --git a/Lib/test/test_future5.py b/Lib/test/test_future5.py
new file mode 100644 (file)
index 0000000..1e1a930
--- /dev/null
@@ -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)