Skip to content

Commit 70d3914

Browse files
committed
Also test negative
1 parent 75a092c commit 70d3914

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_init.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ async def connect(
344344
assert smile._timeout == 10
345345

346346
# Connect to the smile
347+
version = None
347348
try:
348349
version = await smile.connect()
349350
assert version is not None
@@ -353,6 +354,7 @@ async def connect(
353354
pw_exceptions.InvalidXMLError,
354355
pw_exceptions.InvalidAuthentication,
355356
) as exception:
357+
assert version is None
356358
await self.disconnect(server, client)
357359
raise exception
358360

@@ -427,6 +429,7 @@ async def connect_legacy(
427429
assert smile._timeout == 30
428430

429431
# Connect to the smile
432+
version = None
430433
try:
431434
version = await smile.connect()
432435
assert version is not None
@@ -436,6 +439,7 @@ async def connect_legacy(
436439
pw_exceptions.InvalidXMLError,
437440
pw_exceptions.InvalidAuthentication,
438441
) as exception:
442+
assert version is None
439443
await self.disconnect(server, client)
440444
raise exception
441445

0 commit comments

Comments
 (0)