summaryrefslogtreecommitdiff
path: root/setuptools/tests/config/test_expand.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-02-09 15:36:56 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-03-05 09:56:48 +0000
commit82779f9ccf44e0d6cb4e52f960a9fe66e6c0dc01 (patch)
treebebb67bd26e0f96e20e93e87e4b99314f55ceedb /setuptools/tests/config/test_expand.py
parent81c3faaca72550e36809d4bbd9ea3922e89225cf (diff)
downloadpython-setuptools-git-82779f9ccf44e0d6cb4e52f960a9fe66e6c0dc01.tar.gz
Ensure proper exception matching in test_expand
Diffstat (limited to 'setuptools/tests/config/test_expand.py')
-rw-r--r--setuptools/tests/config/test_expand.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/tests/config/test_expand.py b/setuptools/tests/config/test_expand.py
index 4ca23bdc..c33565a0 100644
--- a/setuptools/tests/config/test_expand.py
+++ b/setuptools/tests/config/test_expand.py
@@ -45,12 +45,13 @@ def test_read_files(tmp_path, monkeypatch):
m.chdir(tmp_path)
assert expand.read_files(list(files)) == "a\nb\nc"
- with pytest.raises(DistutilsOptionError):
+ cannot_access_msg = r"Cannot access '.*\.\..a\.txt'"
+ with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
expand.read_files(["../a.txt"])
# Make sure the same APIs work outside cwd
assert expand.read_files(list(files), tmp_path) == "a\nb\nc"
- with pytest.raises(DistutilsOptionError):
+ with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
expand.read_files(["../a.txt"], tmp_path)