Skip to content

Commit 9ccd6e0

Browse files
authored
Merge pull request #53 from saleae/fix/test-invalid-analyzer
add a test that verifies adding an invalid analyzer generates an error.
2 parents 0d7ca19 + 68c973d commit 9ccd6e0

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

python/tests/analyzer_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55

66
import saleae.automation
77

8+
def test_add_nonexistent_analyzer(manager: saleae.automation.Manager, asset_path: str):
9+
"""
10+
PRO-1182: Test that adding a non-existent analyzer returns InvalidRequestError.
11+
"""
12+
path = os.path.join(asset_path, 'small_spi_capture.sal')
13+
14+
with manager.load_capture(path) as cap:
15+
try:
16+
cap.add_analyzer('NonExistentAnalyzer', label='Test', settings={})
17+
assert False, "Expected InvalidRequestError for non-existent analyzer"
18+
except saleae.automation.InvalidRequestError:
19+
pass
20+
21+
822
def test_add_analyzer(manager: saleae.automation.Manager, asset_path: str):
923
path = os.path.join(asset_path, 'small_spi_capture.sal')
1024

0 commit comments

Comments
 (0)