From cb30b7175dde4354f853b096c5785a10530fab4b Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Tue, 2 Jun 2020 20:27:52 +0200 Subject: [PATCH] [tests] update test_config for pytests see #642 --- bumblebee_status/modules/contrib/shell.py | 2 +- pytests/core/test_config.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bumblebee_status/modules/contrib/shell.py b/bumblebee_status/modules/contrib/shell.py index d497adc..a451692 100644 --- a/bumblebee_status/modules/contrib/shell.py +++ b/bumblebee_status/modules/contrib/shell.py @@ -1,6 +1,6 @@ # pylint: disable=C0111,R0903,W1401 -""" Execute command in shell and print result +r""" Execute command in shell and print result Few command examples: 'ping -c 1 1.1.1.1 | grep -Po '(?<=time=)\d+(\.\d+)? ms'' diff --git a/pytests/core/test_config.py b/pytests/core/test_config.py index 7101efc..77ac308 100644 --- a/pytests/core/test_config.py +++ b/pytests/core/test_config.py @@ -88,11 +88,11 @@ def test_all_modules(): assert os.path.exists(os.path.join(base, "contrib", pyname)) \ or os.path.exists(os.path.join(base, "core", pyname)) -#def test_list_output(mocker): -# mocker.patch("core.config.sys") -# cfg = core.config.Config(["-l", "themes"]) -# cfg = core.config.Config(["-l", "modules"]) -# cfg = core.config.Config(["-l", "modules-rst"]) +def test_list_output(mocker): + mocker.patch("core.config.sys") + cfg = core.config.Config(["-l", "themes"]) + cfg = core.config.Config(["-l", "modules"]) + cfg = core.config.Config(["-l", "modules-rst"]) def test_missing_parameter(): cfg = core.config.Config(["-p", "test.key"])