Skip to content

Commit

Permalink
improve pytest.raises matches
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 28, 2024
1 parent 97b8edb commit 247de8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyftpdlib/test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def test_rnfr_rnto(self):
bogus = self.get_testfn()
with pytest.raises(ftplib.error_perm, match="No such file"):
self.client.rename(bogus, '/x')
with pytest.raises(ftplib.error_perm, match="Directory not empty"):
with pytest.raises(ftplib.error_perm):
self.client.rename(self.tempfile, '/')
# rnto sent without first specifying the source
with pytest.raises(ftplib.error_perm, match="use RNFR first"):
Expand Down

0 comments on commit 247de8d

Please sign in to comment.