From 8230149e521a0005c54b5321a9abe8b46a8bdd31 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Wed, 10 Jul 2024 11:47:15 +0000
Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
tests/test_helpers.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index 8b335f06..b13b4832 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -342,16 +342,16 @@ class TestHelpers:
assert "
Hello World!
" in str(f.read())
@pytest.mark.skip(reason="this feature is not yet implemented")
- @pytest.mark.parametrize("encoding", ("utf-8", 'utf-16-le'))
+ @pytest.mark.parametrize("encoding", ("utf-8", "utf-16-le"))
def test_open_resource_with_encoding(self, encoding):
app = flask.Flask(__name__)
- if os.path.isfile('tests/static/test.txt'):
- os.remove('tests/static/test.txt')
+ if os.path.isfile("tests/static/test.txt"):
+ os.remove("tests/static/test.txt")
- with open('tests/static/test.txt', 'w', encoding=encoding) as f:
- f.write(u'' + 'Hello World!')
+ with open("tests/static/test.txt", "w", encoding=encoding) as f:
+ f.write("" + "Hello World!")
- with app.open_resource("static/test.txt", mode='r', encoding=encoding) as f:
+ with app.open_resource("static/test.txt", mode="r", encoding=encoding) as f:
assert "Hello World!" in f.read()
@pytest.mark.parametrize("mode", ("w", "x", "a", "r+"))