Skip to content

Commit

Permalink
Add raise test
Browse files Browse the repository at this point in the history
  • Loading branch information
kolko committed Aug 28, 2015
1 parent 2e4b087 commit 966df93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,14 @@ def test_with():
with (yield from LockFilename('/tmp/test_lock', timeout=1)):
pass

with (yield from LockFilename('/tmp/test_lock')):
pass

@pytest.mark.asyncio
def test_with_exception():
with pytest.raises(Exception):
with (yield from LockFilename('/tmp/test_lock')):
raise Exception()

with (yield from LockFilename('/tmp/test_lock')):
pass

0 comments on commit 966df93

Please sign in to comment.