diff --git a/tests/test_path.py b/tests/test_path.py index ebd23f6..3e78c39 100644 --- a/tests/test_path.py +++ b/tests/test_path.py @@ -188,10 +188,10 @@ def test_encoding_warnings(self, alpharep): """EncodingWarning must blame the read_text and open calls.""" assert sys.flags.warn_default_encoding root = zipfile.Path(alpharep) - with self.assertWarns(EncodingWarning) as wc: + with self.assertWarns(EncodingWarning) as wc: # noqa: F821 (astral-sh/ruff#13287) root.joinpath("a.txt").read_text() assert __file__ == wc.filename - with self.assertWarns(EncodingWarning) as wc: + with self.assertWarns(EncodingWarning) as wc: # noqa: F821 (astral-sh/ruff#13287) root.joinpath("a.txt").open("r").close() assert __file__ == wc.filename