mirror of
https://github.com/clearml/wexpect-venv
synced 2025-06-26 18:15:52 +00:00
[CLN] more lint fixes
This commit is contained in:
parent
4e49107b3c
commit
f6ff2fcf4d
14
tox.ini
14
tox.ini
@ -1,5 +1,5 @@
|
|||||||
# tox.ini
|
# tox.ini
|
||||||
# Run tests of wexpect in multiple configuration.
|
# Run tests of wexpect in multiple configuration.
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
# The following configuration will run automatically.
|
# The following configuration will run automatically.
|
||||||
@ -12,17 +12,17 @@ description = Unit tests
|
|||||||
setenv =
|
setenv =
|
||||||
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||||
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
|
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
# install the dependencies:
|
# install the dependencies:
|
||||||
pip install .[test]
|
pip install .[test]
|
||||||
|
|
||||||
# Run the test itself
|
# Run the test itself
|
||||||
coverage run -m unittest
|
coverage run -m unittest
|
||||||
|
|
||||||
# Dump coverage summary to console
|
# Dump coverage summary to console
|
||||||
coverage report --omit tests/*
|
coverage report --omit=tests/*,site-packages/*
|
||||||
|
|
||||||
# Convert coverage report to standard xml formula the filename includes the tox environment name
|
# Convert coverage report to standard xml formula the filename includes the tox environment name
|
||||||
# https://tox.readthedocs.io/en/latest/config.html#environment-variable-substitutions
|
# https://tox.readthedocs.io/en/latest/config.html#environment-variable-substitutions
|
||||||
coverage xml --omit tests/* -o {env:TOX_ENV_NAME}_coverage.xml
|
coverage xml --omit=tests/*,site-packages -o {env:TOX_ENV_NAME}_coverage.xml
|
||||||
|
@ -646,7 +646,7 @@ class SpawnBase:
|
|||||||
compiled_pattern_list.append(EOF)
|
compiled_pattern_list.append(EOF)
|
||||||
elif p is TIMEOUT:
|
elif p is TIMEOUT:
|
||||||
compiled_pattern_list.append(TIMEOUT)
|
compiled_pattern_list.append(TIMEOUT)
|
||||||
elif type(p) is type(re.compile('')):
|
elif isinstance(p, type(re.compile(''))):
|
||||||
compiled_pattern_list.append(p)
|
compiled_pattern_list.append(p)
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
@ -145,7 +145,7 @@ def join_args(args):
|
|||||||
spaces or any of the characters ^!$%&()[]{}=;'+,`~"""
|
spaces or any of the characters ^!$%&()[]{}=;'+,`~"""
|
||||||
commandline = []
|
commandline = []
|
||||||
for arg in args:
|
for arg in args:
|
||||||
if re.search('[\^!$%&()[\]{}=;\'+,`~\s]', arg):
|
if re.search('[\\^!$%&()[\\]{}=;\'+,`~\\s]', arg):
|
||||||
arg = '"%s"' % arg
|
arg = '"%s"' % arg
|
||||||
commandline.append(arg)
|
commandline.append(arg)
|
||||||
return ' '.join(commandline)
|
return ' '.join(commandline)
|
||||||
|
Loading…
Reference in New Issue
Block a user