Skip to content

Commit

Permalink
Upgrade fakesnow
Browse files Browse the repository at this point in the history
[Fakesnow](https://github.com/tekumara/fakesnow) has had some recent patches to
is precision handling. I'm upgrading to take advantage of it.
  • Loading branch information
criccomini committed Jul 19, 2023
1 parent 85f9a8e commit 195098d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
20 changes: 10 additions & 10 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tests = [
"pytest>=7.2.1",
# For snowflake
"snowflake-connector-python>=3.0.4",
"fakesnow>=0.1.0",
"fakesnow==0.3.0",
# For postgres
"psycopg2-binary>=2.9.6",
]
Expand Down
19 changes: 11 additions & 8 deletions tests/unit/readers/test_snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_struct_method(self):
logical="build.recap.Decimal",
bytes_=16,
variable=False,
precision=64,
precision=38,
scale=0,
),
],
Expand All @@ -100,7 +100,7 @@ def test_struct_method(self):
logical="build.recap.Decimal",
bytes_=16,
variable=False,
precision=32,
precision=38,
scale=0,
),
],
Expand All @@ -114,7 +114,7 @@ def test_struct_method(self):
logical="build.recap.Decimal",
bytes_=16,
variable=False,
precision=16,
precision=38,
scale=0,
),
],
Expand Down Expand Up @@ -157,7 +157,8 @@ def test_struct_method(self):
UnionType(
default=None,
name="TEST_VARCHAR",
types=[NullType(), StringType(bytes_=16_777_216, variable=True)],
# 100 * 4 bytes per character = 400 bytes
types=[NullType(), StringType(bytes_=400, variable=True)],
),
UnionType(
default=None,
Expand Down Expand Up @@ -187,12 +188,14 @@ def test_struct_method(self):
UnionType(
default=None,
name="TEST_CHAR_VARYING",
types=[NullType(), StringType(bytes_=16_777_216, variable=True)],
# 100 * 4 bytes per character = 400 bytes
types=[NullType(), StringType(bytes_=400, variable=True)],
),
UnionType(
default=None,
name="TEST_NCHAR_VARYING",
types=[NullType(), StringType(bytes_=16_777_216, variable=True)],
# 100 * 4 bytes per character = 400 bytes
types=[NullType(), StringType(bytes_=400, variable=True)],
),
UnionType(
default=None,
Expand Down Expand Up @@ -310,7 +313,7 @@ def test_struct_method(self):
logical="build.recap.Decimal",
bytes_=16,
variable=False,
precision=8,
precision=38,
scale=0,
),
],
Expand All @@ -324,7 +327,7 @@ def test_struct_method(self):
logical="build.recap.Decimal",
bytes_=16,
variable=False,
precision=32,
precision=38,
scale=0,
),
],
Expand Down

0 comments on commit 195098d

Please sign in to comment.