summaryrefslogtreecommitdiff
path: root/tests/test_script_consumption.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-11-25 12:29:40 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-11-26 09:18:00 -0500
commit3b09a89d95f765399324dd53b4cb8504b0a7903b (patch)
treedc0837c10c7f0374c14ae4f267598f0060dfaddd /tests/test_script_consumption.py
parentfc451e60731ad5b8d73255f0a1996e1d4e0f20de (diff)
downloadalembic-3b09a89d95f765399324dd53b4cb8504b0a7903b.tar.gz
run pyupgrade
command is: find alembic -name "*.py" | xargs pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format I'm having some weird fighting with the tools/write_pyi, where in different runtime contexts it keeps losing "MigrationContext" and also Callable drops the args, but it's not consisistent. For whatever reason, under py311 things *do* work every time. im working w/ clean tox environments so not really sure what the change is. anyway, let's at least fix the quoting up around the types. This is towards getting the "*" in the op signatures for #1130. Change-Id: I9175905d3b4325e03a97d6752356b70be20e9fad
Diffstat (limited to 'tests/test_script_consumption.py')
-rw-r--r--tests/test_script_consumption.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_script_consumption.py b/tests/test_script_consumption.py
index d478ae1..fa84d7e 100644
--- a/tests/test_script_consumption.py
+++ b/tests/test_script_consumption.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-
from contextlib import contextmanager
import os
import re
@@ -369,7 +367,7 @@ class CallbackEnvironmentTest(ApplyVersionsFunctionalTest):
alembic.mock_event_listener = None
self._env_file_fixture()
with mock.patch("alembic.mock_event_listener", mock.Mock()) as mymock:
- super(CallbackEnvironmentTest, self).test_steps()
+ super().test_steps()
calls = mymock.call_args_list
assert calls
for call in calls:
@@ -682,7 +680,7 @@ def downgrade():
bytes_io=True, output_encoding="utf-8"
) as buf:
command.upgrade(self.cfg, self.a, sql=True)
- assert "« S’il vous plaît…".encode("utf-8") in buf.getvalue()
+ assert "« S’il vous plaît…".encode() in buf.getvalue()
class VersionNameTemplateTest(TestBase):