1 | n/a | # Check that multiple features can be enabled. |
---|
2 | n/a | from __future__ import unicode_literals, print_function |
---|
3 | n/a | |
---|
4 | n/a | import sys |
---|
5 | n/a | import unittest |
---|
6 | n/a | from test import support |
---|
7 | n/a | |
---|
8 | n/a | |
---|
9 | n/a | class TestMultipleFeatures(unittest.TestCase): |
---|
10 | n/a | |
---|
11 | n/a | def test_unicode_literals(self): |
---|
12 | n/a | self.assertIsInstance("", str) |
---|
13 | n/a | |
---|
14 | n/a | def test_print_function(self): |
---|
15 | n/a | with support.captured_output("stderr") as s: |
---|
16 | n/a | print("foo", file=sys.stderr) |
---|
17 | n/a | self.assertEqual(s.getvalue(), "foo\n") |
---|
18 | n/a | |
---|
19 | n/a | |
---|
20 | n/a | if __name__ == '__main__': |
---|
21 | n/a | unittest.main() |
---|