mirror of
https://github.com/clearml/wexpect-venv
synced 2025-02-24 21:24:29 +00:00
[ADD] no cover pragmas; faster descrutor test
This commit is contained in:
parent
c1e81b3a69
commit
f9b6ee08a4
@ -31,7 +31,7 @@ class TestCaseDestructor(PexpectTestCase.PexpectTestCase):
|
||||
# Details of garbage collection are different on other implementations
|
||||
return 'SKIP'
|
||||
gc.collect()
|
||||
time.sleep(3)
|
||||
time.sleep(2)
|
||||
p1 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
p2 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
p3 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
@ -50,7 +50,7 @@ class TestCaseDestructor(PexpectTestCase.PexpectTestCase):
|
||||
p3 = None
|
||||
p4 = None
|
||||
gc.collect()
|
||||
time.sleep(3) # Some platforms are slow at gc... Solaris!
|
||||
time.sleep(2) # Some platforms are slow at gc... Solaris!
|
||||
|
||||
p1 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
p2 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
@ -66,7 +66,7 @@ class TestCaseDestructor(PexpectTestCase.PexpectTestCase):
|
||||
del (p3)
|
||||
del (p4)
|
||||
gc.collect()
|
||||
time.sleep(3)
|
||||
time.sleep(2)
|
||||
|
||||
p1 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
p2 = wexpect.spawn('%s hello_world.py' % self.PYTHONBIN)
|
||||
|
@ -67,7 +67,7 @@ $Id: pexpect.py 507 2007-12-27 02:40:52Z noah $
|
||||
# wexpect is windows only. Use pexpect on linux like systems.
|
||||
#
|
||||
import sys
|
||||
if sys.platform != 'win32':
|
||||
if sys.platform != 'win32': # pragma: no cover
|
||||
raise ImportError (str(e) + """
|
||||
sys.platform != 'win32': Wexpect supports only Windows.
|
||||
Pexpect is intended for UNIX-like operating systems.""")
|
||||
@ -102,7 +102,7 @@ try:
|
||||
import win32api
|
||||
import win32file
|
||||
import winerror
|
||||
except ImportError as e:
|
||||
except ImportError as e: # pragma: no cover
|
||||
raise ImportError(str(e) + "\nThis package requires the win32 python packages.\r\nInstall with pip install pywin32")
|
||||
|
||||
#
|
||||
@ -122,7 +122,7 @@ Please contact me and report it at github.com/raczben/wexpect if you use it.
|
||||
# The version is handled by the package: pbr, which derives the version from the git tags.
|
||||
try:
|
||||
__version__ = pkg_resources.require("wexpect")[0].version
|
||||
except:
|
||||
except: # pragma: no cover
|
||||
__version__ = '0.0.1.unkowndev0'
|
||||
__revision__ = '$Revision: 399 $'
|
||||
|
||||
@ -2347,7 +2347,7 @@ class Wtty:
|
||||
finally:
|
||||
self.switchBack()
|
||||
|
||||
raise Exception('Unreachable code...')
|
||||
raise Exception('Unreachable code...') # pragma: no cover
|
||||
|
||||
|
||||
def refreshConsole(self):
|
||||
|
Loading…
Reference in New Issue
Block a user