Skip to content

Commit

Permalink
Fix test type hints, ignore more things in git
Browse files Browse the repository at this point in the history
  • Loading branch information
ojii committed Oct 25, 2021
1 parent 4e37c16 commit 5f5170c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ poetry.lock
__pycache__
/dist
*.swp
.*
*.egg-info
build/
docs/_build/
19 changes: 7 additions & 12 deletions tests/integration/test_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio
import secrets
from operator import itemgetter
from typing import Optional

import pytest
from yarl import URL
Expand Down Expand Up @@ -72,7 +71,7 @@ async def test_create_table_with_indices(client: Client, table_name_prefix):

@pytest.mark.parametrize("consistent_read", [True, False])
async def test_put_get_item(
client: Client, table: TableName, consistent_read: Optional[bool]
client: Client, table: TableName, consistent_read: bool
) -> None:
item = {
"h": "hash key value",
Expand Down Expand Up @@ -145,7 +144,7 @@ async def test_count(client: Client, table: TableName) -> None:

@pytest.mark.parametrize("consistent_read", [True, False])
async def test_count_with_limit(
client: Client, prefilled_table: TableName, consistent_read: Optional[bool]
client: Client, prefilled_table: TableName, consistent_read: bool
) -> None:
assert (
await client.count(
Expand Down Expand Up @@ -175,7 +174,7 @@ async def test_scan_count(client: Client, table: TableName) -> None:

@pytest.mark.parametrize("consistent_read", [True, False])
async def test_scan_count_with_limit(
client: Client, prefilled_table: TableName, consistent_read: Optional[bool]
client: Client, prefilled_table: TableName, consistent_read: bool
) -> None:
assert (
await client.scan_count(
Expand Down Expand Up @@ -243,9 +242,7 @@ async def test_delete_table(client: Client, table_factory: TableFactory) -> None


@pytest.mark.parametrize("consistent_read", [True, False])
async def test_query(
client: Client, table: TableName, consistent_read: Optional[bool]
) -> None:
async def test_query(client: Client, table: TableName, consistent_read: bool) -> None:
item1 = {"h": "h", "r": "1", "d": "x"}
item2 = {"h": "h", "r": "2", "d": "y"}
items = [item1, item2]
Expand Down Expand Up @@ -274,9 +271,7 @@ async def test_query_descending(client: Client, table: TableName) -> None:


@pytest.mark.parametrize("consistent_read", [True, False])
async def test_scan(
client: Client, table: TableName, consistent_read: Optional[bool]
) -> None:
async def test_scan(client: Client, table: TableName, consistent_read: bool) -> None:
item1 = {"h": "h", "r": "1", "d": "x"}
item2 = {"h": "h", "r": "2", "d": "y"}
items = [item1, item2]
Expand Down Expand Up @@ -369,7 +364,7 @@ async def test_query_with_limit(client: Client, prefilled_table: TableName) -> N

@pytest.mark.parametrize("consistent_read", [True, False])
async def test_query_single_page(
client: Client, prefilled_table: TableName, consistent_read: Optional[bool]
client: Client, prefilled_table: TableName, consistent_read: bool
) -> None:
first_page = await client.query_single_page(
prefilled_table, HashKey("h", "h"), consistent_read=consistent_read
Expand All @@ -389,7 +384,7 @@ async def test_query_single_page(

@pytest.mark.parametrize("consistent_read", [True, False])
async def test_scan_single_page(
client: Client, prefilled_table: TableName, consistent_read: Optional[bool]
client: Client, prefilled_table: TableName, consistent_read: bool
) -> None:
first_page = await client.scan_single_page(
prefilled_table, consistent_read=consistent_read
Expand Down

0 comments on commit 5f5170c

Please sign in to comment.