1
1
import time
2
+ import pytest
2
3
from sqlalchemy import text , select , MetaData , Table
3
4
from timeplus import View
4
5
5
6
7
+ @pytest .mark .skip (reason = "Skipping this test for now" )
6
8
def test_driver_sql (engine ):
7
9
with engine .connect () as conn :
8
10
result = conn .exec_driver_sql (
9
11
"select cid from table(car_live_data) limit 5" )
10
12
assert len (result .fetchall ()) == 5
11
13
12
14
15
+ @pytest .mark .skip (reason = "Skipping this test for now" )
13
16
def test_driver_sql_live (engine ):
14
17
with engine .connect () as conn :
15
18
result = conn .exec_driver_sql (
16
19
"select cid from car_live_data limit 5" )
17
20
assert len (result .fetchall ()) == 5
18
21
19
-
22
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
20
23
def test_text_sql (engine ):
21
24
with engine .connect () as connection :
22
25
result = connection .execute (
23
26
text ("select * from table(car_live_data) limit 3" ))
24
27
rows = [row for row in result ]
25
28
assert len (rows ) == 3
26
29
27
-
30
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
28
31
def test_text_sql_live (engine ):
29
32
with engine .connect () as connection :
30
33
result = connection .execute (
31
34
text ("select * from car_live_data limit 3" ))
32
35
rows = [row for row in result ]
33
36
assert len (rows ) == 3
34
37
35
-
38
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
36
39
def test_text_streaming_sql (engine ):
37
40
with engine .connect () as connection :
38
41
result = connection .execute (text ("select * from car_live_data" ))
@@ -45,20 +48,20 @@ def test_text_streaming_sql(engine):
45
48
break
46
49
assert count == max
47
50
48
-
51
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
49
52
def test_check_stream_existence (engine ):
50
53
table_name = "car_live_data"
51
54
with engine .connect () as conn :
52
55
table_exists = engine .dialect .has_table (conn , table_name )
53
56
assert table_exists
54
57
55
-
58
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
56
59
def test_table_names (engine ):
57
60
with engine .connect () as conn :
58
61
tables = engine .dialect .get_table_names (conn )
59
62
assert "car_live_data" in tables
60
63
61
-
64
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
62
65
def test_view_names (test_environment , engine ):
63
66
view_name = "example_mv"
64
67
view = View (env = test_environment ).name (view_name )
@@ -84,7 +87,7 @@ def test_view_names(test_environment, engine):
84
87
85
88
view .delete ()
86
89
87
-
90
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
88
91
def test_materialized_view_names (engine ,test_environment ,test_stream ):
89
92
view_name = "example_mv"
90
93
view = View (env = test_environment ).name (view_name )
@@ -108,23 +111,23 @@ def test_materialized_view_names(engine,test_environment,test_stream):
108
111
109
112
view .delete ()
110
113
111
-
114
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
112
115
def test_view_reflection (engine ):
113
116
metadata_obj = MetaData ()
114
117
car_view = Table ("car_live_data" , metadata_obj , autoload_with = engine )
115
118
assert car_view is not None
116
119
column_names = [c .name for c in car_view .columns ]
117
120
assert "speed_kmh" in column_names
118
121
119
-
122
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
120
123
def test_table_reflection (engine ):
121
124
metadata_obj = MetaData ()
122
125
car_table = Table ("car_live_data" , metadata_obj , autoload_with = engine )
123
126
assert car_table is not None
124
127
column_names = [c .name for c in car_table .columns ]
125
128
assert "cid" in column_names
126
129
127
-
130
+ @ pytest . mark . skip ( reason = "Skipping this test for now" )
128
131
def test_select_query (engine ):
129
132
metadata_obj = MetaData ()
130
133
car_table = Table ("car_live_data" , metadata_obj , autoload_with = engine )
0 commit comments