Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 6570d071faca9cc5f8abbe3163969b8c0b0d76b4 authored by Benjamin Peterson on 07 November 2008, 03:51:42 UTC
name the release
Tip revision: 6570d07
test_future5.py
# Check that multiple features can be enabled.
from __future__ import unicode_literals, print_function

import sys
import unittest
from . import support


class TestMultipleFeatures(unittest.TestCase):

    def test_unicode_literals(self):
        self.assertTrue(isinstance("", str))

    def test_print_function(self):
        with support.captured_output("stderr") as s:
            print("foo", file=sys.stderr)
        self.assertEqual(s.getvalue(), "foo\n")


def test_main():
    support.run_unittest(TestMultipleFeatures)
back to top