Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tempsdb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
tempsdb
Commits
fa818830
Commit
fa818830
authored
3 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
test for trimming multiple chunks
parent
335a30c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_series.py
+16
-1
16 additions, 1 deletion
tests/test_series.py
with
16 additions
and
1 deletion
tests/test_series.py
+
16
−
1
View file @
fa818830
...
@@ -4,7 +4,7 @@ import unittest
...
@@ -4,7 +4,7 @@ import unittest
class
TestSeries
(
unittest
.
TestCase
):
class
TestSeries
(
unittest
.
TestCase
):
def
test_trim_multiple_chunks
(
self
):
def
test_trim_multiple_chunks
_wo_close
(
self
):
from
tempsdb.series
import
create_series
,
TimeSeries
from
tempsdb.series
import
create_series
,
TimeSeries
series
=
create_series
(
'
test7
'
,
'
test7
'
,
10
,
4096
)
series
=
create_series
(
'
test7
'
,
'
test7
'
,
10
,
4096
)
...
@@ -15,6 +15,21 @@ class TestSeries(unittest.TestCase):
...
@@ -15,6 +15,21 @@ class TestSeries(unittest.TestCase):
with
series
.
iterate_range
(
0
,
17000
)
as
it
:
with
series
.
iterate_range
(
0
,
17000
)
as
it
:
for
ts
,
v
in
it
:
for
ts
,
v
in
it
:
self
.
assertNotEqual
(
ts
,
0
)
self
.
assertNotEqual
(
ts
,
0
)
series
.
close
()
def
test_trim_multiple_chunks_with_close
(
self
):
from
tempsdb.series
import
create_series
,
TimeSeries
series
=
create_series
(
'
test8
'
,
'
test8
'
,
10
,
4096
)
for
i
in
range
(
0
,
16000
):
series
.
append
(
i
,
b
'
\x00
'
*
10
)
series
.
close
()
series
=
TimeSeries
(
'
test8
'
,
'
test8
'
)
series
.
trim
(
8000
)
with
series
.
iterate_range
(
0
,
17000
)
as
it
:
for
ts
,
v
in
it
:
self
.
assertNotEqual
(
ts
,
0
)
series
.
close
()
def
test_write_series_append_after_close
(
self
):
def
test_write_series_append_after_close
(
self
):
from
tempsdb.series
import
create_series
,
TimeSeries
from
tempsdb.series
import
create_series
,
TimeSeries
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment