Skip to content

Commit 0b45370

Browse files
ChsudeeptaChsudeepta
authored andcommitted
Added test case
1 parent 797e831 commit 0b45370

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_genie_waitfor.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,15 @@ def test_GIVEN_waitfor_mevents_WHEN_waitfor_mevents_THEN_output(self):
8282
self.genie_waitfor.start_waiting(mevents=0, quiet=False)
8383
sys.stdout = sys.__stdout__
8484
self.assertIsNot("", capturedOutput.getvalue())
85+
86+
def test_GIVEN_waitfor_block_WHEN_waitfor_block_integer_THEN_error_output(self):
87+
capturedOutput = StringIO()
88+
sys.stdout = capturedOutput
89+
# Exception condition
90+
with self.assertRaises(TypeError) as context:
91+
intBlock = 10
92+
self.genie_waitfor.start_waiting(block=intBlock)
93+
self.assertEqual(
94+
str(context.exception),
95+
"The very first argument must be valid block name or None, not {}".format(intBlock),
96+
)

0 commit comments

Comments
 (0)