1
0
Fork 0

Adding upstream version 3.3.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 20:42:17 +01:00
parent 2f72ef8d68
commit 8a475bec34
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
7 changed files with 24 additions and 14 deletions

View file

@ -529,7 +529,15 @@ class Error(Exception):
def test_load_from_filename_file_does_not_exist():
with pytest.raises(Error) as excinfo:
load_from_filename('does_not_exist', map_required, json.loads, Error)
assert excinfo.value.args[0].error_msg == 'does_not_exist does not exist'
assert excinfo.value.args[0].error_msg == 'does_not_exist is not a file'
def test_load_from_filename_not_a_file(tmpdir):
with tmpdir.as_cwd():
tmpdir.join('f').ensure_dir()
with pytest.raises(Error) as excinfo:
load_from_filename('f', map_required, json.loads, Error)
assert excinfo.value.args[0].error_msg == 'f is not a file'
def test_load_from_filename_unicode_error(tmp_path):