Skip to content

Commit

Permalink
feat: lint tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
harshachinta committed Mar 28, 2023
1 parent d76e2d5 commit aca3c5b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions tests/system/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def database_dialect():
@pytest.fixture(scope="session")
def proto_descriptor_file():
import os

dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, "testdata/descriptors.pb")
return open(
Expand Down
12 changes: 6 additions & 6 deletions tests/system/test_database_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,11 @@ def _unit_of_work(transaction, name):


def test_create_table_with_proto_columns(
not_emulator,
not_postgres,
shared_instance,
databases_to_delete,
proto_descriptor_file,
not_emulator,
not_postgres,
shared_instance,
databases_to_delete,
proto_descriptor_file,
):
proto_cols_db_id = _helpers.unique_id("proto-columns")

Expand Down Expand Up @@ -688,7 +688,7 @@ def test_compatibility_of_proto_columns(not_emulator, not_postgres, shared_datab


def test_proto_columns_dml_parameterized_queries_pk_indexes(
not_emulator, not_postgres, shared_database
not_emulator, not_postgres, shared_database
):
def _unit_of_work(transaction):
singer1_proto_enum = singer_pb2.Genre.ROCK
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ def test_ctor_w_encryption_config(self):
def test_ctor_w_proto_descriptors(self):

instance = _Instance(self.INSTANCE_NAME)
database = self._make_one(
self.DATABASE_ID, instance, proto_descriptors=b""
)
database = self._make_one(self.DATABASE_ID, instance, proto_descriptors=b"")
self.assertEqual(database.database_id, self.DATABASE_ID)
self.assertIs(database._instance, instance)
self.assertEqual(database._proto_descriptors, b"")
Expand Down Expand Up @@ -365,7 +363,9 @@ def test_proto_descriptors(self):

instance = _Instance(self.INSTANCE_NAME)
pool = _Pool()
database = self._make_one(self.DATABASE_ID, instance, pool=pool, proto_descriptors=b"")
database = self._make_one(
self.DATABASE_ID, instance, pool=pool, proto_descriptors=b""
)
self.assertEqual(database.proto_descriptors, b"")

def test_spanner_api_property_w_scopeless_creds(self):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_param_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ def test_it(self):
found = param_types.ProtoEnum(singer_genre)

self.assertEqual(found, expected)

6 changes: 5 additions & 1 deletion tests/unit/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,11 @@ def test_read(self):
self.assertIs(found, snapshot().read.return_value)

snapshot().read.assert_called_once_with(
TABLE_NAME, COLUMNS, KEYSET, INDEX, LIMIT,
TABLE_NAME,
COLUMNS,
KEYSET,
INDEX,
LIMIT,
column_info=None,
)

Expand Down

0 comments on commit aca3c5b

Please sign in to comment.