home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 July / maximum-cd-2011-07.iso / DiscContents / LibO_3.3.2_Win_x86_install_multi.exe / libreoffice1.cab / test_future5.py < prev    next >
Encoding:
Python Source  |  2011-03-15  |  549 b   |  22 lines

  1. # Check that multiple features can be enabled.
  2. from __future__ import unicode_literals, print_function
  3.  
  4. import sys
  5. import unittest
  6. from . import test_support
  7.  
  8.  
  9. class TestMultipleFeatures(unittest.TestCase):
  10.  
  11.     def test_unicode_literals(self):
  12.         self.assertTrue(isinstance("", unicode))
  13.  
  14.     def test_print_function(self):
  15.         with test_support.captured_output("stderr") as s:
  16.             print("foo", file=sys.stderr)
  17.         self.assertEqual(s.getvalue(), "foo\n")
  18.  
  19.  
  20. def test_main():
  21.     test_support.run_unittest(TestMultipleFeatures)
  22.