Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
new slice test failing
Browse files Browse the repository at this point in the history
  • Loading branch information
quantmind committed Nov 26, 2012
1 parent facb1e4 commit 1fb4e4c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
@@ -1,5 +1,8 @@
.. _vers07:

Ver. 0.7.1 - Development
===============================

Ver. 0.7.0 - 2012 Oct 25
===============================
* First official release of version 0.7.0. Requires redis_ 2.6 or above.
Expand Down
2 changes: 1 addition & 1 deletion runtests.py
Expand Up @@ -14,7 +14,7 @@
from stdnet.test import nose, pulsar


def noseoption(argv,*vals,**kwargs):
def noseoption(argv, *vals, **kwargs):
if vals:
for val in vals:
if val in argv:
Expand Down
2 changes: 1 addition & 1 deletion stdnet/odm/models.py
Expand Up @@ -50,7 +50,7 @@ def __init__(self, **kwargs):
keys += ' are'
else:
keys += ' is an'
raise ValueError("%s invalid keyword for %s." % (keys,self._meta))
raise ValueError("%s invalid keyword for %s." % (keys, self._meta))

@property
def has_all_data(self):
Expand Down
4 changes: 2 additions & 2 deletions stdnet/utils/dates.py
Expand Up @@ -128,8 +128,8 @@ def missing_intervals(startdate, enddate, start, end,
The list could countain 0,1 or 2 tuples.'''
parseinterval = parseinterval or default_parse_interval
dateconverter = dateconverter or todate
startdate = dateconverter(parseinterval(startdate,0))
enddate = max(startdate,dateconverter(parseinterval(enddate,0)))
startdate = dateconverter(parseinterval(startdate, 0))
enddate = max(startdate, dateconverter(parseinterval(enddate,0)))

if intervals is not None and not isinstance(intervals,Intervals):
intervals = Intervals(intervals)
Expand Down
7 changes: 7 additions & 0 deletions tests/regression/query/slice.py
Expand Up @@ -66,4 +66,11 @@ def testSliceBack(self):
q1 = qs[-2:-1]
self.assertEqual(len(q1),1)
self.assertEqual(q1[0].id,N-1)

def testSliceGetField(self):
'''test silve in conjunction with get_field method'''
session = self.session()
qs = session.query(self.model).get_field('id')
q1 = qs[:2]
self.assertEqual(len(q1), 2)

0 comments on commit 1fb4e4c

Please sign in to comment.