Skip to content

Commit 4ffeb08

Browse files
author
Theofilos Manitaras
committed
Address PR comments and add unittest
1 parent 83d134e commit 4ffeb08

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

reframe/frontend/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,9 @@ def restrict_logging():
771771
else:
772772
# Create a unique value to differentiate between configuration
773773
# parameters with value `None` and invalid ones
774-
default = time.time()
774+
default = {'token'}
775775
value = rt.get_option(config_param, default)
776-
if value == default:
776+
if value is default:
777777
printer.error(
778778
f'no such configuration parameter found: {config_param}'
779779
)

unittests/test_cli.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,17 @@ def test_show_config_unknown_param(run_reframe):
620620
assert returncode == 0
621621

622622

623+
def test_show_config_null_param(run_reframe):
624+
returncode, stdout, stderr = run_reframe(
625+
more_options=['--show-config=general/report_junit'],
626+
system='testsys'
627+
)
628+
assert 'null' in stdout
629+
assert 'Traceback' not in stdout
630+
assert 'Traceback' not in stderr
631+
assert returncode == 0
632+
633+
623634
def test_verbosity(run_reframe):
624635
returncode, stdout, stderr = run_reframe(
625636
more_options=['-vvvvv'],

0 commit comments

Comments
 (0)