summaryrefslogtreecommitdiff
path: root/tests/test_script_consumption.py
diff options
context:
space:
mode:
authorCaselIT <cfederico87@gmail.com>2021-04-18 11:41:04 +0200
committerCaselIT <cfederico87@gmail.com>2021-06-22 23:05:35 +0200
commitb511670231e99c5278d58e789f9efb7855488b41 (patch)
tree231ab1213581dc6db708f478d2d54d48dcd16518 /tests/test_script_consumption.py
parentb1e5a23c0f53482dd06b013ce8a9453dd0e5eb5d (diff)
downloadalembic-b511670231e99c5278d58e789f9efb7855488b41.tar.gz
Drop compatibility with python 2.7.
Now alembic supports only python from version 3.6. Change-Id: Iccf124c2d74af801d90a16c9003cdad318768625
Diffstat (limited to 'tests/test_script_consumption.py')
-rw-r--r--tests/test_script_consumption.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/test_script_consumption.py b/tests/test_script_consumption.py
index e7eda64..4b46564 100644
--- a/tests/test_script_consumption.py
+++ b/tests/test_script_consumption.py
@@ -31,7 +31,7 @@ from alembic.testing.fixtures import TestBase
from alembic.util import compat
-class PatchEnvironment(object):
+class PatchEnvironment:
branched_connection = False
@contextmanager
@@ -301,8 +301,7 @@ class SimpleSourcelessApplyVersionsTest(ApplyVersionsFunctionalTest):
id_="r",
)
class NewFangledSourcelessApplyVersionsTest(ApplyVersionsFunctionalTest):
-
- __requires__ = ("pep3147",)
+ pass
class CallbackEnvironmentTest(ApplyVersionsFunctionalTest):
@@ -644,8 +643,7 @@ class EncodingTest(TestBase):
script,
self.a,
(
- compat.u(
- """# coding: utf-8
+ """# coding: utf-8
from __future__ import unicode_literals
revision = '%s'
down_revision = None
@@ -659,7 +657,6 @@ def downgrade():
op.execute("drôle de petite voix m’a réveillé")
"""
- )
% self.a
),
encoding="utf-8",
@@ -673,7 +670,7 @@ def downgrade():
bytes_io=True, output_encoding="utf-8"
) as buf:
command.upgrade(self.cfg, self.a, sql=True)
- assert compat.u("« S’il vous plaît…").encode("utf-8") in buf.getvalue()
+ assert "« S’il vous plaît…".encode("utf-8") in buf.getvalue()
class VersionNameTemplateTest(TestBase):
@@ -847,14 +844,10 @@ class SimpleSourcelessIgnoreFilesTest(IgnoreFilesTest):
class NewFangledEnvOnlySourcelessIgnoreFilesTest(IgnoreFilesTest):
sourceless = "pep3147_envonly"
- __requires__ = ("pep3147",)
-
class NewFangledEverythingSourcelessIgnoreFilesTest(IgnoreFilesTest):
sourceless = "pep3147_everything"
- __requires__ = ("pep3147",)
-
class SourcelessNeedsFlagTest(TestBase):
def setUp(self):