From 0af9bba5b1a5c766670bb7bfa4a83920162d6679 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Tue, 11 Jan 2022 18:00:52 +1300 Subject: [PATCH] Fix again --- test_miniirc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_miniirc.py b/test_miniirc.py index 37f4f46..ed9885b 100644 --- a/test_miniirc.py +++ b/test_miniirc.py @@ -90,7 +90,8 @@ def f3(irc, command, hostmask, args): def test_version(): setup_py = pathlib.Path(__file__).resolve().parent / 'setup.py' - match = re.search(r"version *= '([0-9\.a-z]+)',", setup_py.read_text()) + with setup_py.open() as f: + match = re.search(r"version *= '([0-9\.a-z]+)',", f.read()) assert match assert miniirc.__version__ == match.group(1)