| Benjamin Peterson | 9aebc61 | 2008-10-26 20:58:53 +0000 | [diff] [blame] | 1 | # Check that multiple features can be enabled. | 
 | 2 | from __future__ import unicode_literals, print_function | 
 | 3 |  | 
 | 4 | import sys | 
 | 5 | import unittest | 
| Mark Dickinson | eceebeb | 2011-06-25 13:29:14 +0200 | [diff] [blame] | 6 | from test import support | 
| Benjamin Peterson | 9aebc61 | 2008-10-26 20:58:53 +0000 | [diff] [blame] | 7 |  | 
 | 8 |  | 
 | 9 | class TestMultipleFeatures(unittest.TestCase): | 
 | 10 |  | 
 | 11 |     def test_unicode_literals(self): | 
| Ezio Melotti | e961593 | 2010-01-24 19:26:24 +0000 | [diff] [blame] | 12 |         self.assertIsInstance("", str) | 
| Benjamin Peterson | 9aebc61 | 2008-10-26 20:58:53 +0000 | [diff] [blame] | 13 |  | 
 | 14 |     def test_print_function(self): | 
 | 15 |         with support.captured_output("stderr") as s: | 
 | 16 |             print("foo", file=sys.stderr) | 
 | 17 |         self.assertEqual(s.getvalue(), "foo\n") | 
 | 18 |  | 
 | 19 |  | 
| Ezio Melotti | 1ed6be3 | 2013-02-27 10:00:03 +0200 | [diff] [blame] | 20 | if __name__ == '__main__': | 
 | 21 |     unittest.main() |