From 7f544d71e2bdef6b0f118802dfb25a65243dd58f Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Sat, 12 Dec 2015 16:48:28 -0800 Subject: Change test condition: TRAVIS => Linux platform --- tests/test_interact.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/test_interact.py b/tests/test_interact.py index 865353b..76a071e 100755 --- a/tests/test_interact.py +++ b/tests/test_interact.py @@ -24,6 +24,7 @@ from __future__ import unicode_literals import os import pexpect +import platform import unittest import sys from . import PexpectTestCase @@ -62,10 +63,12 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase): p.sendcontrol(']') p.expect('29') p.send('\x00') - if not os.environ.get('TRAVIS', None): - # on Travis-CI, we sometimes miss trailing stdout from the - # chain of child processes, not entirely sure why. So this - # is skipped on such systems. + + if not platform.system() == 'Linux': + # on Linux, we sometimes miss trailing stdout from the + # chain of child processes through a subprocess call to + # interact() method. This condition so far is only reproduced + # within these constraints so far, skipped for now. p.expect('0') p.expect_exact('Escaped interact') p.expect(pexpect.EOF) @@ -84,10 +87,11 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase): p.expect('206') # [206, 146] p.expect('146') p.send('\x00') - if not os.environ.get('TRAVIS', None): - # on Travis-CI, we sometimes miss trailing stdout from the - # chain of child processes, not entirely sure why. So this - # is skipped on such systems. + if not platform.system() == 'Linux': + # on Linux, we sometimes miss trailing stdout from the + # chain of child processes through a subprocess call to + # interact() method. This condition so far is only reproduced + # within these constraints so far, skipped for now. p.expect('0') p.expect_exact('Escaped interact') p.expect(pexpect.EOF) -- cgit v1.2.1