defl/tests.old/test_sqllite.py

30 lines
704 B
Python
Raw Permalink Normal View History

2024-09-11 11:14:03 -04:00
#!/usr/bin/env python
from dataclasses import dataclass, field, KW_ONLY
from typing import ClassVar, Any, Callable, NewType, Container, Mapping, Self, ValuesView, KeysView, ItemsView
import defl
import sys
import pathlib
from operator import itemgetter
from defl import log, cl
from typing import ClassVar
import defl
from defl.sqlite_ import sqliteContextManager
import json
from defl import log, cl, testing_
tester = testing_.Tester(name=__file__)
@tester.add()
def createTableList():
with sqliteContextManager('/tmp/test.db') as cur:
version = cur.execute('select sqlite_version();')
log.info('version', lambda x: x.version)
log.info(tester.run())
tester.exitWithStatus()