From: Luís Henrique Allebrandt Schunemann <44511825+luishenri@users.noreply.github.com> Date: Thu, 14 Aug 2025 21:51:26 +0000 (-0300) Subject: test(config): add test for integer value in TOML configuration X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=591f79f004d1b4e826947194d1898ca71d69ffa9;p=thirdparty%2Fsqlalchemy%2Falembic.git test(config): add test for integer value in TOML configuration --- diff --git a/tests/test_config.py b/tests/test_config.py index 40a22f71..1205fbf2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -586,6 +586,23 @@ script_location = "%(here)s/scripts" sd = ScriptDirectory.from_config(cfg) eq_(getattr(sd, paramname), bool(argtype.true)) + def test_toml_int_value(self, pyproject_only_env): + cfg = pyproject_only_env + with cfg._toml_file_path.open("wb") as file_: + file_.write( + rb""" +[tool.alembic] +script_location = "%(here)s/scripts" + +my_int = 42 +""" + ) + if "toml_alembic_config" in cfg.__dict__: + cfg.__dict__.pop("toml_alembic_config") + + value = cfg.get_alembic_option("my_int") + eq_(value, "42") + class StdoutOutputEncodingTest(TestBase): def test_plain(self):