Skip to content

Commit 85bbc9c

Browse files
author
Vasileios Karakasis
committed
Address PR comments (II)
1 parent 59e9f57 commit 85bbc9c

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

unittests/test_pipeline.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -537,29 +537,29 @@ def prepare(self):
537537

538538
def test_post_init_hook(local_exec_ctx):
539539
class _T0(rfm.RunOnlyRegressionTest):
540-
x = variable(int, value=0)
541-
y = variable(int, value=1)
540+
x = variable(str, value='y')
541+
y = variable(str, value='x')
542542

543543
def __init__(self):
544-
self.x = 1
544+
self.x = 'x'
545545

546546
@rfm.run_after('init')
547547
def prepare(self):
548-
self.y += 1
548+
self.y += 'y'
549549

550550
class _T1(_T0):
551551
def __init__(self):
552552
super().__init__()
553-
self.z = 3
553+
self.z = 'z'
554554

555555
t0 = _T0()
556-
assert t0.x == 1
557-
assert t0.y == 2
556+
assert t0.x == 'x'
557+
assert t0.y == 'xy'
558558

559559
t1 = _T1()
560-
assert t1.x == 1
561-
assert t1.y == 2
562-
assert t1.z == 3
560+
assert t1.x == 'x'
561+
assert t1.y == 'xy'
562+
assert t1.z == 'z'
563563

564564

565565
def test_setup_hooks(HelloTest, local_exec_ctx):

unittests/test_policies.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -864,12 +864,8 @@ def test_restore_session(report_file, make_runner,
864864
assert new_report['runs'][0]['testcases'][0]['name'] == 'T1'
865865

866866
# Remove the test case dump file and retry
867-
try:
868-
os.remove(tmp_path / 'stage' / 'generic' / 'default' /
869-
'builtin' / 'T4' / '.rfm_testcase.json')
870-
except OSError:
871-
import reframe.utility as util
872-
print('==> dep_cases', util.repr(dep_cases))
867+
os.remove(tmp_path / 'stage' / 'generic' / 'default' /
868+
'builtin' / 'T4' / '.rfm_testcase.json')
873869

874870
with pytest.raises(ReframeError, match=r'could not restore testcase'):
875871
report.restore_dangling(testgraph)

0 commit comments

Comments
 (0)