-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for propagating exception through client
- Loading branch information
1 parent
073f92d
commit 16fb949
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |