Commit 2d73d575 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

tsio: provide a `type` method that will help specializers define other time series type

parent 005a8e258f03
......@@ -30,6 +30,8 @@ def utcdt(*dt):
def test_in_tx(engine):
tsh = TimeSerie()
assert tsh.type(engine, 'foo') == 'primary'
with pytest.raises(TypeError) as err:
tsh.insert(engine, 0, 0, 0)
assert err.value.args[0] == 'You must use a transaction object'
......@@ -157,6 +157,9 @@ class TimeSerie(SeriesServices):
return cn.execute(sql).scalar()
def type(self, cn, name):
return 'primary'
def get_history(self, cn, seriename,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment