Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
fix tests after RTS change in logic - no negative timestamp (#120)
Browse files Browse the repository at this point in the history
* fix tests after RTS change in logic - no negative timestamp

* virtualenv pin due to onx issue

Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
  • Loading branch information
OfirMos and chayim authored Mar 1, 2022
1 parent 0ddff95 commit e8f0f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ commands:
- run:
name: install tox dependencies
command: |
pip install --user --quiet --upgrade pip virtualenv
pip install --user --quiet --upgrade pip virtualenv==20.7.2
pip install --user --quiet -r .circleci/circle_requirements.txt
- run:
Expand Down
8 changes: 4 additions & 4 deletions test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def testRange(self):
filter_by_max_value=2)))
self.assertEqual([(0, 10.0), (10, 1.0)],
rts.range(1, 0, 10, aggregation_type='count', bucket_size_msec=10, align='+'))
self.assertEqual([(-5, 5.0), (5, 6.0)],
self.assertEqual([(0, 5.0), (5, 6.0)],
rts.range(1, 0, 10, aggregation_type='count', bucket_size_msec=10, align=5))

def testRevRange(self):
Expand All @@ -229,7 +229,7 @@ def testRevRange(self):
filter_by_max_value=2)))
self.assertEqual([(10, 1.0), (0, 10.0)],
rts.revrange(1, 0, 10, aggregation_type='count', bucket_size_msec=10, align='+'))
self.assertEqual([(1, 10.0), (-9, 1.0)],
self.assertEqual([(1, 10.0), (0, 1.0)],
rts.revrange(1, 0, 10, aggregation_type='count', bucket_size_msec=10, align=1))

def testMultiRange(self):
Expand Down Expand Up @@ -280,7 +280,7 @@ def testMultiRange(self):
res = rts.mrange(0, 10, filters=['team=ny'], aggregation_type='count', bucket_size_msec=10, align='-')
self.assertEqual([(0, 10.0), (10, 1.0)], res[0]['1'][1])
res = rts.mrange(0, 10, filters=['team=ny'], aggregation_type='count', bucket_size_msec=10, align=5)
self.assertEqual([(-5, 5.0), (5, 6.0)], res[0]['1'][1])
self.assertEqual([(0, 5.0), (5, 6.0)], res[0]['1'][1])

def testMultiReverseRange(self):
'''Test TS.MREVRANGE calls which returns range by filter'''
Expand Down Expand Up @@ -333,7 +333,7 @@ def testMultiReverseRange(self):
res = rts.mrevrange(0, 10, filters=['team=ny'], aggregation_type='count', bucket_size_msec=10, align='-')
self.assertEqual([(10, 1.0), (0, 10.0)], res[0]['1'][1])
res = rts.mrevrange(0, 10, filters=['team=ny'], aggregation_type='count', bucket_size_msec=10, align=1)
self.assertEqual([(1, 10.0), (-9, 1.0)], res[0]['1'][1])
self.assertEqual([(1, 10.0), (0, 1.0)], res[0]['1'][1])

def testGet(self):
'''Test TS.GET calls'''
Expand Down

0 comments on commit e8f0f1f

Please sign in to comment.