Skip to content

Commit

Permalink
Add test for propagating exception through client
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbmi committed Apr 7, 2023
1 parent 073f92d commit 16fb949
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mne_realtime/tests/test_base_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Author: Charles Guan <charles@ae.studio>
#
# License: BSD (3-clause)

import pytest

from mne_realtime.base_client import _BaseClient


def test_base_client():
"""Initialize _BaseClient as context manager."""
with _BaseClient() as client:
pass


def test_base_client_propagate_exception():
"""_BaseClient propagates exceptions to user."""
with pytest.raises(Exception):
with _BaseClient() as client:
raise Exception

0 comments on commit 16fb949

Please sign in to comment.