Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
singlestore-labs
GitHub Repository: singlestore-labs/singlestoredb-python
Path: blob/main/singlestoredb/tests/test_plugin.py
469 views
1
#!/usr/bin/env python
2
# type: ignore
3
"""SingleStoreDB Pytest Plugin testing
4
5
Each of these tests performs the same simple operation which
6
would fail if any other test had been run on the same database.
7
"""
8
from singlestoredb.connection import Cursor
9
10
# pytest_plugins = ('singlestoredb.pytest',)
11
12
CREATE_TABLE_STATEMENT = 'create table test_dict (a text)'
13
14
15
def test_tempdb1(singlestoredb_tempdb: Cursor):
16
# alias the fixture
17
cursor = singlestoredb_tempdb
18
19
cursor.execute(CREATE_TABLE_STATEMENT)
20
21
22
def test_tempdb2(singlestoredb_tempdb: Cursor):
23
# alias the fixture
24
cursor = singlestoredb_tempdb
25
26
cursor.execute(CREATE_TABLE_STATEMENT)
27
28
29
def test_tempdb3(singlestoredb_tempdb: Cursor):
30
# alias the fixture
31
cursor = singlestoredb_tempdb
32
33
cursor.execute(CREATE_TABLE_STATEMENT)
34
35