diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-16 13:39:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-16 13:39:03 -0400 |
commit | 01b5e5fa08c646d3d1f65c731136a1a6a9255315 (patch) | |
tree | 42847808837754253953dbbe6382cb06966faeca /tests | |
parent | c97d5b3dd6fde31acb8e9e0c67d0ebc54fa0d809 (diff) | |
download | alembic-01b5e5fa08c646d3d1f65c731136a1a6a9255315.tar.gz |
repair py2k support
the editor patch had some py3 isms as a result of us disabling
the python 2 tests in gerrit. need to move forward w/ the py3k
or re-enable py2k
Change-Id: If47b0ebc105131fd3e7b8e6d76e0555da1484b8c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_editor.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_editor.py b/tests/test_editor.py index 0ec6f5f..4a58b8f 100644 --- a/tests/test_editor.py +++ b/tests/test_editor.py @@ -1,21 +1,23 @@ import os from os.path import join -from unittest.mock import patch from alembic import util from alembic.testing import combinations from alembic.testing import expect_raises_message +from alembic.testing import mock from alembic.testing.fixtures import TestBase class TestHelpers(TestBase): def common(self, cb, is_posix=True): - with patch("alembic.util.editor.check_call") as check_call, patch( + with mock.patch( + "alembic.util.editor.check_call" + ) as check_call, mock.patch( "alembic.util.editor.exists" - ) as exists, patch( + ) as exists, mock.patch( "alembic.util.editor.is_posix", new=is_posix, - ), patch( + ), mock.patch( "os.pathsep", new=":" if is_posix else ";" ): cb(check_call, exists) |