sqlmesh 0.184.4.dev6__py3-none-any.whl → 0.184.4.dev8__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.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/test/definition.py +17 -14
- sqlmesh/core/test/result.py +12 -6
- sqlmesh/core/test/runner.py +4 -2
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/METADATA +1 -1
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/RECORD +10 -10
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/WHEEL +0 -0
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.184.4.dev6.dist-info → sqlmesh-0.184.4.dev8.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.184.4.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 184, 4, '
|
|
20
|
+
__version__ = version = '0.184.4.dev8'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 184, 4, 'dev8')
|
sqlmesh/core/test/definition.py
CHANGED
|
@@ -349,18 +349,21 @@ class ModelTest(unittest.TestCase):
|
|
|
349
349
|
else:
|
|
350
350
|
_raise_error(f"Model '{name}' is an unsupported model type for testing", path)
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
352
|
+
try:
|
|
353
|
+
return test_type(
|
|
354
|
+
body,
|
|
355
|
+
test_name,
|
|
356
|
+
t.cast(Model, model),
|
|
357
|
+
models,
|
|
358
|
+
engine_adapter,
|
|
359
|
+
dialect,
|
|
360
|
+
path,
|
|
361
|
+
preserve_fixtures,
|
|
362
|
+
default_catalog,
|
|
363
|
+
concurrency,
|
|
364
|
+
)
|
|
365
|
+
except Exception as e:
|
|
366
|
+
raise TestError(f"Failed to create test {test_name} ({path})\n{str(e)}")
|
|
364
367
|
|
|
365
368
|
def __str__(self) -> str:
|
|
366
369
|
return f"{self.test_name} ({self.path})"
|
|
@@ -905,8 +908,8 @@ def _row_difference(left: pd.DataFrame, right: pd.DataFrame) -> pd.DataFrame:
|
|
|
905
908
|
|
|
906
909
|
def _raise_error(msg: str, path: Path | None = None) -> None:
|
|
907
910
|
if path:
|
|
908
|
-
raise TestError(f"
|
|
909
|
-
raise TestError(msg)
|
|
911
|
+
raise TestError(f"Failed to run test at {path}:\n{msg}")
|
|
912
|
+
raise TestError(f"Failed to run test:\n{msg}")
|
|
910
913
|
|
|
911
914
|
|
|
912
915
|
def _normalize_df_value(value: t.Any) -> t.Any:
|
sqlmesh/core/test/result.py
CHANGED
|
@@ -17,6 +17,8 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
17
17
|
def __init__(self, *args: t.Any, **kwargs: t.Any):
|
|
18
18
|
super().__init__(*args, **kwargs)
|
|
19
19
|
self.successes = []
|
|
20
|
+
self.original_failures: t.List[t.Tuple[unittest.TestCase, ErrorType]] = []
|
|
21
|
+
self.original_errors: t.List[t.Tuple[unittest.TestCase, ErrorType]] = []
|
|
20
22
|
|
|
21
23
|
def addSubTest(
|
|
22
24
|
self,
|
|
@@ -48,8 +50,9 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
48
50
|
test: The test case.
|
|
49
51
|
err: A tuple of the form returned by sys.exc_info(), i.e., (type, value, traceback).
|
|
50
52
|
"""
|
|
51
|
-
exctype, value,
|
|
52
|
-
self.
|
|
53
|
+
exctype, value, _ = err
|
|
54
|
+
self.original_failures.append((test, err))
|
|
55
|
+
# Intentionally ignore the traceback to hide it from the user
|
|
53
56
|
return super().addFailure(test, (exctype, value, None)) # type: ignore
|
|
54
57
|
|
|
55
58
|
def addError(self, test: unittest.TestCase, err: ErrorType) -> None:
|
|
@@ -59,8 +62,10 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
59
62
|
test: The test case.
|
|
60
63
|
err: A tuple of the form returned by sys.exc_info(), i.e., (type, value, traceback).
|
|
61
64
|
"""
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
exctype, value, _ = err
|
|
66
|
+
self.original_errors.append((test, err))
|
|
67
|
+
# Intentionally ignore the traceback to hide it from the user
|
|
68
|
+
return super().addError(test, (exctype, value, None)) # type: ignore
|
|
64
69
|
|
|
65
70
|
def addSuccess(self, test: unittest.TestCase) -> None:
|
|
66
71
|
"""Called when the test case test succeeds.
|
|
@@ -105,9 +110,10 @@ class ModelTextTestResult(unittest.TextTestResult):
|
|
|
105
110
|
stream.writeln(unittest.TextTestResult.separator2)
|
|
106
111
|
stream.writeln(failure)
|
|
107
112
|
|
|
108
|
-
for
|
|
113
|
+
for test_case, error in errors:
|
|
109
114
|
stream.writeln(unittest.TextTestResult.separator1)
|
|
110
|
-
stream.writeln(f"ERROR: {
|
|
115
|
+
stream.writeln(f"ERROR: {test_case}")
|
|
116
|
+
stream.writeln(error)
|
|
111
117
|
|
|
112
118
|
# Output final report
|
|
113
119
|
stream.writeln(unittest.TextTestResult.separator2)
|
sqlmesh/core/test/runner.py
CHANGED
|
@@ -150,9 +150,11 @@ def run_tests(
|
|
|
150
150
|
if result.successes:
|
|
151
151
|
combined_results.addSuccess(result.successes[0])
|
|
152
152
|
elif result.errors:
|
|
153
|
-
|
|
153
|
+
for error_test, error in result.original_errors:
|
|
154
|
+
combined_results.addError(error_test, error)
|
|
154
155
|
elif result.failures:
|
|
155
|
-
|
|
156
|
+
for failure_test, failure in result.original_failures:
|
|
157
|
+
combined_results.addFailure(failure_test, failure)
|
|
156
158
|
elif result.skipped:
|
|
157
159
|
skipped_args = result.skipped[0]
|
|
158
160
|
combined_results.addSkip(skipped_args[0], skipped_args[1])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=hw-1Ly8usBs0rvnRk9Mg-gvidRW6GRPbiWFKtjuVWMQ,528
|
|
3
3
|
sqlmesh/magics.py,sha256=aeOyTdeNnyGzGtJXECDAbqJ8OAplrV4UAYl0I2hhtig,39670
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -116,10 +116,10 @@ sqlmesh/core/state_sync/db/utils.py,sha256=204OpT3ISFPCwWP9Aqq8nr6ETl24sbG5uOyo8
|
|
|
116
116
|
sqlmesh/core/state_sync/db/version.py,sha256=CZN2o1jxfsPxTGouncQIT51q61ObZKCuQdvWUWyTrI0,2201
|
|
117
117
|
sqlmesh/core/test/__init__.py,sha256=e83TJPwPRR_rAG29Y0OVbZb-5oWVBzz-_wrcd22Qk10,418
|
|
118
118
|
sqlmesh/core/test/context.py,sha256=Shmft5gRWCsk8Hropfmd4otWkLmw43r_uzrr6Azu5Ns,2220
|
|
119
|
-
sqlmesh/core/test/definition.py,sha256=
|
|
119
|
+
sqlmesh/core/test/definition.py,sha256=LhsRkmCxpMOlf4niBdRV1Anv2VBGsqxJ2k-odfsIbbw,37146
|
|
120
120
|
sqlmesh/core/test/discovery.py,sha256=WXIwPidLoacAGHoT_3TVFFEKamG89nHNtaMsZ01uGjs,1188
|
|
121
|
-
sqlmesh/core/test/result.py,sha256=
|
|
122
|
-
sqlmesh/core/test/runner.py,sha256=
|
|
121
|
+
sqlmesh/core/test/result.py,sha256=CR8c_tdBK7p8jx-dMibbj4zCtxVAmE_Xah9GQ5oPBTE,4218
|
|
122
|
+
sqlmesh/core/test/runner.py,sha256=yno0GDUW9angCy2ZeLIZE9lKrqBiJOnFibu6RLuct6I,6647
|
|
123
123
|
sqlmesh/dbt/__init__.py,sha256=KUv-lW5sG9D2ceXAIzA4MLcjyhzq3E-7qJP4P_PH2EU,144
|
|
124
124
|
sqlmesh/dbt/adapter.py,sha256=_mqeRE6HGj3rHeFQyYKsMXvydkuxX9G-dO-z2gSI7lw,16538
|
|
125
125
|
sqlmesh/dbt/basemodel.py,sha256=XuiK9-r5JWzvZGEk98Jt4ukR2exfMDsotGZqYx5xluc,12561
|
|
@@ -268,7 +268,7 @@ sqlmesh/utils/pydantic.py,sha256=-u69PDY-4FLR7ODNKBoN7PsPNmZ0wdhsJcCAG2P6vyY,110
|
|
|
268
268
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
269
269
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
270
270
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
271
|
-
sqlmesh-0.184.4.
|
|
271
|
+
sqlmesh-0.184.4.dev8.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
272
272
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
273
|
web/client/dist/index.html,sha256=x9qfdHkVkXOwWRFRCZGaixiLj5e9tOQsCDRR92vW9QI,5472
|
|
274
274
|
web/client/dist/assets/Audits-cGDtiiKB.js,sha256=jrS4x1nQ8Klx67744_LjNI2oBOI9XnnygDR-0wmlme8,1041
|
|
@@ -386,8 +386,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
386
386
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
387
387
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
388
388
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
389
|
-
sqlmesh-0.184.4.
|
|
390
|
-
sqlmesh-0.184.4.
|
|
391
|
-
sqlmesh-0.184.4.
|
|
392
|
-
sqlmesh-0.184.4.
|
|
393
|
-
sqlmesh-0.184.4.
|
|
389
|
+
sqlmesh-0.184.4.dev8.dist-info/METADATA,sha256=PF4KiAKgyGtwZPLXv1v2c8uiSv9Df_7FeYkRd3R7K2A,25498
|
|
390
|
+
sqlmesh-0.184.4.dev8.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
391
|
+
sqlmesh-0.184.4.dev8.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
392
|
+
sqlmesh-0.184.4.dev8.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
393
|
+
sqlmesh-0.184.4.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|