We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 550307f commit 720d578Copy full SHA for 720d578
tests/test_impl.py
@@ -78,3 +78,16 @@ def broken_callback() -> None:
78
stop()
79
await asyncio.sleep(_INOTIFY_WAIT_TIME)
80
assert not called
81
+
82
83
+@pytest.mark.asyncio
84
+@pytest.mark.skipif(
85
+ platform != "linux", reason="Inotify not available on this platform"
86
+)
87
+async def test_aiousbwatcher_attempt_to_start_twice(tmp_path: Path) -> None:
88
+ with patch("aiousbwatcher.impl._PATH", str(tmp_path)):
89
+ watcher = AIOUSBWatcher()
90
+ stop = watcher.async_start()
91
+ with pytest.raises(RuntimeError):
92
+ watcher.async_start()
93
+ stop()
0 commit comments