Skip to content

Commit fcb30fc

Browse files
author
Vasileios Karakasis
committed
Add unit test for loading bad test in __init__()
1 parent 7c051cf commit fcb30fc

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import reframe as rfm
2+
3+
4+
@rfm.simple_test
5+
class BadInitTest(rfm.RegressionTest):
6+
def __init__(self):
7+
foo

unittests/test_loader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,8 @@ def test_load_bad_required_version(self):
6363
with self.assertRaises(ValueError):
6464
self.loader.load_from_file('unittests/resources/checks_unlisted/'
6565
'no_required_version.py')
66+
67+
def test_load_bad_init(self):
68+
tests = self.loader.load_from_file(
69+
'unittests/resources/checks_unlisted/bad_init_check.py')
70+
self.assertEqual(0, len(tests))

0 commit comments

Comments
 (0)