Skip to content

Commit

Permalink
Strengthened test to confirm int indexing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhluongo committed Jan 12, 2014
1 parent 5f8097d commit a2e5e7a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions neo4django/tests/nodequeryset_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ def test_filter_range():
all_between_s_u = Person.objects.filter(name__range=('S','U'))
assert len(all_between_s_u) >= 1, "There's at least one 'T' name!"

# test that indexed negatives works properly (#232)
for i in xrange(-10, 0):
Person.objects.create(age=i)
super_young = list(Person.objects.filter(age__range=(-10,-5)))
eq_(6, len(super_young))
eq_(sorted(p.age for p in super_young), range(-10, -4))


@with_setup(None, teardown)
def test_filter_float_range():
Expand Down

0 comments on commit a2e5e7a

Please sign in to comment.