fakesnow 0.9.14__py3-none-any.whl → 0.9.16__py3-none-any.whl

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.
fakesnow/fakes.py CHANGED
@@ -297,6 +297,9 @@ class FakeSnowflakeCursor:
297
297
  elif cmd == "CREATE TABLE" and ident:
298
298
  result_sql = SQL_CREATED_TABLE.substitute(name=ident)
299
299
 
300
+ elif cmd.startswith("ALTER") and ident:
301
+ result_sql = SQL_SUCCESS
302
+
300
303
  elif cmd == "CREATE VIEW" and ident:
301
304
  result_sql = SQL_CREATED_VIEW.substitute(name=ident)
302
305
 
@@ -517,7 +520,7 @@ class FakeSnowflakeConnection:
517
520
  self.schema = schema and schema.upper()
518
521
  self.database_set = False
519
522
  self.schema_set = False
520
- self.db_path = db_path
523
+ self.db_path = Path(db_path) if db_path else None
521
524
  self.nop_regexes = nop_regexes
522
525
  self._paramstyle = snowflake.connector.paramstyle
523
526
 
@@ -532,7 +535,7 @@ class FakeSnowflakeConnection:
532
535
  where catalog_name = '{self.database}'"""
533
536
  ).fetchone()
534
537
  ):
535
- db_file = f"{Path(db_path)/self.database}.db" if db_path else ":memory:"
538
+ db_file = f"{self.db_path/self.database}.db" if self.db_path else ":memory:"
536
539
  duck_conn.execute(f"ATTACH DATABASE '{db_file}' AS {self.database}")
537
540
  duck_conn.execute(info_schema.creation_sql(self.database))
538
541
  duck_conn.execute(macros.creation_sql(self.database))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fakesnow
3
- Version: 0.9.14
3
+ Version: 0.9.16
4
4
  Summary: Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally.
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -3,16 +3,16 @@ fakesnow/__main__.py,sha256=GDrGyNTvBFuqn_UfDjKs7b3LPtU6gDv1KwosVDrukIM,76
3
3
  fakesnow/checks.py,sha256=-QMvdcrRbhN60rnzxLBJ0IkUBWyLR8gGGKKmCS0w9mA,2383
4
4
  fakesnow/cli.py,sha256=9qfI-Ssr6mo8UmIlXkUAOz2z2YPBgDsrEVaZv9FjGFs,2201
5
5
  fakesnow/expr.py,sha256=CAxuYIUkwI339DQIBzvFF0F-m1tcVGKEPA5rDTzmH9A,892
6
- fakesnow/fakes.py,sha256=JM3Tt4ivDC6ddrVioT66yK2irL-wPDDFIEjUBxTq6G8,30277
6
+ fakesnow/fakes.py,sha256=MiP4DprXzzIIZXy4_7juGl7HDNm_leBopdWue3JnNCM,30402
7
7
  fakesnow/fixtures.py,sha256=G-NkVeruSQAJ7fvSS2fR2oysUn0Yra1pohHlOvacKEk,455
8
8
  fakesnow/global_database.py,sha256=WTVIP1VhNvdCeX7TQncX1TRpGQU5rBf5Pbxim40zeSU,1399
9
9
  fakesnow/info_schema.py,sha256=CdIcGXHEQ_kmEAzdQKvA-PX41LA6wlK-4p1J45qgKYA,6266
10
10
  fakesnow/macros.py,sha256=pX1YJDnQOkFJSHYUjQ6ErEkYIKvFI6Ncz_au0vv1csA,265
11
11
  fakesnow/py.typed,sha256=B-DLSjYBi7pkKjwxCSdpVj2J02wgfJr-E7B1wOUyxYU,80
12
12
  fakesnow/transforms.py,sha256=8DwHoJ09U2915DovAH_ul0_5WzlUkHYLLK1njyhER4s,51230
13
- fakesnow-0.9.14.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
14
- fakesnow-0.9.14.dist-info/METADATA,sha256=qbt6HAOnnIuoB3dZ-JayLpH-pHqVsCQ1l-Qu8lsxSP0,17840
15
- fakesnow-0.9.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
- fakesnow-0.9.14.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
17
- fakesnow-0.9.14.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
18
- fakesnow-0.9.14.dist-info/RECORD,,
13
+ fakesnow-0.9.16.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
14
+ fakesnow-0.9.16.dist-info/METADATA,sha256=hQFvS32nk-bbzcigfd8L33U8-yiDjqkV9PWAP3MBuoU,17840
15
+ fakesnow-0.9.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
+ fakesnow-0.9.16.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
17
+ fakesnow-0.9.16.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
18
+ fakesnow-0.9.16.dist-info/RECORD,,