1 # Copyright 2009-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 from portage.tests import TestCase
5 from portage.util._pty import _can_test_pty_eof, _test_pty_eof
7 class PtyEofTestCase(TestCase):
11 if not _can_test_pty_eof():
12 skip_reason = "unsupported on this platform"
13 self.portage_skip = skip_reason
14 self.fail(skip_reason)
17 # This tests if the following python issue is fixed yet:
18 # http://bugs.python.org/issue5380
19 # Since it might not be fixed, mark as todo.
21 # The result is only valid if openpty does not raise EnvironmentError.
22 if _can_test_pty_eof():
24 self.assertEqual(_test_pty_eof(), True)
25 except EnvironmentError: