From 62af81e355015de90ff89962f72f8450d4ca52be Mon Sep 17 00:00:00 2001 From: Tsuyoshi Hombashi Date: Sun, 10 Sep 2023 18:51:35 +0900 Subject: [PATCH] Apply formatter --- simplesqlite/core.py | 2 +- test/test_simplesqlite.py | 30 ++++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/simplesqlite/core.py b/simplesqlite/core.py index 1aa24ba..d0e53e2 100644 --- a/simplesqlite/core.py +++ b/simplesqlite/core.py @@ -149,7 +149,7 @@ def __init__( delayed_connection: bool = True, max_workers: Optional[int] = None, profile: bool = False, - **connect_kwargs: Any + **connect_kwargs: Any, ) -> None: self.debug_query = False diff --git a/test/test_simplesqlite.py b/test/test_simplesqlite.py index ac70ce5..cd39abd 100644 --- a/test/test_simplesqlite.py +++ b/test/test_simplesqlite.py @@ -51,7 +51,13 @@ class Test_SimpleSQLite_init: - @pytest.mark.parametrize(["mode"], [["w"], ["a"]]) + @pytest.mark.parametrize( + ["mode"], + [ + ["w"], + ["a"], + ], + ) def test_normal_path(self, tmpdir, mode): p = tmpdir.join("test.sqlite3") db_path = str(p) @@ -60,7 +66,13 @@ def test_normal_path(self, tmpdir, mode): assert con.database_path == db_path assert con.connection is not None - @pytest.mark.parametrize(["mode"], [["w"], ["a"]]) + @pytest.mark.parametrize( + ["mode"], + [ + ["w"], + ["a"], + ], + ) def test_normal_con(self, mode): con = SimpleSQLite(connect_memdb().connection, mode) assert con.database_path is None @@ -96,7 +108,12 @@ def test_exception_invalid_arg(self, value, mode, expected): SimpleSQLite(value, mode).connection @pytest.mark.parametrize( - ["mode", "expected"], [["r", DatabaseError], ["w", DatabaseError], ["a", DatabaseError]] + ["mode", "expected"], + [ + ["r", DatabaseError], + ["w", DatabaseError], + ["a", DatabaseError], + ], ) def test_exception_invalid_file(self, tmpdir, mode, expected): p = tmpdir.join("testdata.txt") @@ -393,7 +410,12 @@ def test_normal(self, con): class Test_SimpleSQLite_fetch_attr_names: - @pytest.mark.parametrize(["value", "expected"], [[TEST_TABLE_NAME, ["attr_a", "attr_b"]]]) + @pytest.mark.parametrize( + ["value", "expected"], + [ + [TEST_TABLE_NAME, ["attr_a", "attr_b"]], + ], + ) def test_normal(self, con, value, expected): assert con.fetch_attr_names(value) == expected