ยปCore Development>Code coverage>Lib/test/test_future5.py

Python code coverage for Lib/test/test_future5.py

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