Permalink
Browse files

new slice test failing

  • Loading branch information...
quantmind
quantmind committed Nov 26, 2012
1 parent facb1e4 commit 1fb4e4c7125f3010da4b9b6d50621d9cc28b5595
Showing with 14 additions and 4 deletions.
  1. +3 −0 CHANGELOG.rst
  2. +1 −1 runtests.py
  3. +1 −1 stdnet/odm/models.py
  4. +2 −2 stdnet/utils/dates.py
  5. +7 −0 tests/regression/query/slice.py
View
@@ -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.
View
@@ -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:
View
@@ -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):
View
@@ -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)
@@ -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.