Skip to content

Commit 4af7feb

Browse files
committed
Update pytest.raises in test to use context manager
1 parent 52ce0f6 commit 4af7feb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/test_rsync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class dirs:
4545
class TestRSync:
4646
def test_notargets(self, dirs):
4747
rsync = RSync(dirs.source)
48-
py.test.raises(IOError, "rsync.send()")
48+
with pytest.raises(IOError):
49+
rsync.send()
4950
assert rsync.send(raises=False) is None
5051

5152
def test_dirsync(self, dirs, gw1, gw2):

0 commit comments

Comments
 (0)