Skip to content

Commit

Permalink
Simplify unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarak committed Dec 5, 2024
1 parent 8e5ab3c commit 7a5d3da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 44 deletions.
14 changes: 14 additions & 0 deletions unittests/resources/checks_unlisted/fixtures_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,17 @@ def validate_fixture_resolution(self):
ParamFixture.num_variants
)
])


@rfm.simple_test
class TestC(rfm.RunOnlyRegressionTest):
valid_systems = ['*']
valid_prog_environs = ['*']
executable = 'echo'
f0 = fixture(SimpleFixture, scope='environment', variables={'data': 10})
f1 = fixture(SimpleFixture, scope='environment', variables={'data': 20})

@sanity_function
def validate_vars(self):
return sn.all([sn.assert_eq(self.f0.data, 10),
sn.assert_eq(self.f1.data, 20)])
32 changes: 0 additions & 32 deletions unittests/resources/checks_unlisted/fixtures_same_class.py

This file was deleted.

12 changes: 0 additions & 12 deletions unittests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,18 +1228,6 @@ def test_fixture_resolution(run_reframe, run_action):
assert returncode == 0


def test_fixture_resolution_same_class(run_reframe, run_action):
returncode, stdout, stderr = run_reframe(
system='sys1',
environs=[],
checkpath=[
'unittests/resources/checks_unlisted/fixtures_same_class.py'
],
action=run_action
)
assert returncode == 0


def test_dynamic_tests(run_reframe, run_action):
returncode, stdout, _ = run_reframe(
system='sys0',
Expand Down

0 comments on commit 7a5d3da

Please sign in to comment.