fakesnow 0.5.0__tar.gz → 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {fakesnow-0.5.0/fakesnow.egg-info → fakesnow-0.5.1}/PKG-INFO +1 -1
  2. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/fakes.py +1 -1
  3. {fakesnow-0.5.0 → fakesnow-0.5.1/fakesnow.egg-info}/PKG-INFO +1 -1
  4. {fakesnow-0.5.0 → fakesnow-0.5.1}/pyproject.toml +1 -1
  5. {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_fakes.py +14 -0
  6. {fakesnow-0.5.0 → fakesnow-0.5.1}/LICENSE +0 -0
  7. {fakesnow-0.5.0 → fakesnow-0.5.1}/MANIFEST.in +0 -0
  8. {fakesnow-0.5.0 → fakesnow-0.5.1}/README.md +0 -0
  9. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/__init__.py +0 -0
  10. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/checks.py +0 -0
  11. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/expr.py +0 -0
  12. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/fixtures.py +0 -0
  13. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/info_schema.py +0 -0
  14. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/py.typed +0 -0
  15. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/transforms.py +0 -0
  16. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/SOURCES.txt +0 -0
  17. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/dependency_links.txt +0 -0
  18. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/requires.txt +0 -0
  19. {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/top_level.txt +0 -0
  20. {fakesnow-0.5.0 → fakesnow-0.5.1}/setup.cfg +0 -0
  21. {fakesnow-0.5.0 → fakesnow-0.5.1}/setup.py +0 -0
  22. {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_checks.py +0 -0
  23. {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_expr.py +0 -0
  24. {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_patch.py +0 -0
  25. {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_transforms.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fakesnow
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Fake Snowflake Connector for Python. Run Snowflake DB locally.
5
5
  License: MIT License
6
6
 
@@ -276,7 +276,7 @@ class FakeSnowflakeCursor:
276
276
  def as_result_metadata(column_name: str, column_type: str, _: str) -> ResultMetadata:
277
277
  # see https://docs.snowflake.com/en/user-guide/python-connector-api.html#type-codes
278
278
  # and https://arrow.apache.org/docs/python/api/datatypes.html#type-checking
279
- if column_type == "BIGINT":
279
+ if column_type in {"BIGINT", "INTEGER"}:
280
280
  return ResultMetadata(
281
281
  name=column_name, type_code=0, display_size=None, internal_size=None, precision=38, scale=0, is_nullable=True # noqa: E501
282
282
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fakesnow
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Fake Snowflake Connector for Python. Run Snowflake DB locally.
5
5
  License: MIT License
6
6
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "fakesnow"
3
3
  description = "Fake Snowflake Connector for Python. Run Snowflake DB locally."
4
- version = "0.5.0"
4
+ version = "0.5.1"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
7
7
  classifiers = ["License :: OSI Approved :: MIT License"]
@@ -234,6 +234,20 @@ def test_describe(cur: snowflake.connector.cursor.SnowflakeCursor):
234
234
  assert cur.description == expected_metadata
235
235
 
236
236
 
237
+ def test_describe_info_schema(cur: snowflake.connector.cursor.SnowflakeCursor):
238
+ # tests we can handle the column types returned from the info schema, which are created by duckdb
239
+ # and so don't go through our transforms
240
+ cur.execute("select column_name, ordinal_position from information_schema.columns")
241
+ # fmt: off
242
+ expected_metadata = [
243
+ ResultMetadata(name='column_name', type_code=2, display_size=None, internal_size=16777216, precision=None, scale=None, is_nullable=True),
244
+ ResultMetadata(name='ordinal_position', type_code=0, display_size=None, internal_size=None, precision=38, scale=0, is_nullable=True)
245
+ ]
246
+ # fmt: on
247
+
248
+ assert cur.description == expected_metadata
249
+
250
+
237
251
  def test_executemany(cur: snowflake.connector.cursor.SnowflakeCursor):
238
252
  cur.execute("create table customers (ID int, FIRST_NAME varchar, LAST_NAME varchar)")
239
253
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes