summaryrefslogtreecommitdiff
path: root/tests/test_script_production.py
diff options
context:
space:
mode:
authorCaselIT <cfederico87@gmail.com>2023-04-02 12:21:00 +0200
committerFederico Caselli <cfederico87@gmail.com>2023-04-28 21:00:04 +0000
commite460d6756b86260460986eea292d30225e20d137 (patch)
tree7bc55b06b86f5b70200a0abaf5f235c90571250d /tests/test_script_production.py
parentabd175bf86b1091fe444b91c4f98dc9ea97ff723 (diff)
downloadalembic-e460d6756b86260460986eea292d30225e20d137.tar.gz
Added quiet option to command line
Added quiet option to the command line, using the ``-q/--quiet`` option. This flag will prevent alembic from logging anything to stdout. Fixes: #1109 Change-Id: I7d9fac05d93e07efaefd87a582a7e785891798ef
Diffstat (limited to 'tests/test_script_production.py')
-rw-r--r--tests/test_script_production.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/test_script_production.py b/tests/test_script_production.py
index 151b3b8..d50f7f5 100644
--- a/tests/test_script_production.py
+++ b/tests/test_script_production.py
@@ -1,5 +1,6 @@
import datetime
import os
+from pathlib import Path
import re
from unittest.mock import patch
@@ -1333,28 +1334,23 @@ class NormPathTest(TestBase):
).replace("/", ":NORM:"),
)
- def test_script_location_muliple(self):
+ def test_script_location_multiple(self):
config = _multi_dir_testing_config()
script = ScriptDirectory.from_config(config)
- def normpath(path):
+ def _normpath(path):
return path.replace("/", ":NORM:")
- normpath = mock.Mock(side_effect=normpath)
+ normpath = mock.Mock(side_effect=_normpath)
with mock.patch("os.path.normpath", normpath):
+ sd = Path(_get_staging_directory()).as_posix()
eq_(
script._version_locations,
[
- os.path.abspath(
- os.path.join(_get_staging_directory(), "model1/")
- ).replace("/", ":NORM:"),
- os.path.abspath(
- os.path.join(_get_staging_directory(), "model2/")
- ).replace("/", ":NORM:"),
- os.path.abspath(
- os.path.join(_get_staging_directory(), "model3/")
- ).replace("/", ":NORM:"),
+ _normpath(os.path.abspath(sd + "/model1/")),
+ _normpath(os.path.abspath(sd + "/model2/")),
+ _normpath(os.path.abspath(sd + "/model3/")),
],
)