Skip to content
This repository
Browse code

new slice test failing

  • Loading branch information...
commit 1fb4e4c7125f3010da4b9b6d50621d9cc28b5595 1 parent facb1e4
authored November 26, 2012
3  CHANGELOG.rst
Source Rendered
... ...
@@ -1,5 +1,8 @@
1 1
 .. _vers07:
2 2
 
  3
+Ver. 0.7.1 - Development
  4
+===============================
  5
+
3 6
 Ver. 0.7.0 - 2012 Oct 25
4 7
 ===============================
5 8
 * First official release of version 0.7.0. Requires redis_ 2.6 or above.
2  runtests.py
@@ -14,7 +14,7 @@
14 14
 from stdnet.test import nose, pulsar
15 15
 
16 16
 
17  
-def noseoption(argv,*vals,**kwargs):
  17
+def noseoption(argv, *vals, **kwargs):
18 18
     if vals:
19 19
         for val in vals:
20 20
             if val in argv:
2  stdnet/odm/models.py
@@ -50,7 +50,7 @@ def __init__(self, **kwargs):
50 50
                 keys += ' are'
51 51
             else:
52 52
                 keys += ' is an'
53  
-            raise ValueError("%s invalid keyword for %s." % (keys,self._meta))
  53
+            raise ValueError("%s invalid keyword for %s." % (keys, self._meta))
54 54
 
55 55
     @property
56 56
     def has_all_data(self):
4  stdnet/utils/dates.py
@@ -128,8 +128,8 @@ def missing_intervals(startdate, enddate, start, end,
128 128
 The list could countain 0,1 or 2 tuples.'''
129 129
     parseinterval = parseinterval or default_parse_interval
130 130
     dateconverter = dateconverter or todate
131  
-    startdate = dateconverter(parseinterval(startdate,0))
132  
-    enddate   = max(startdate,dateconverter(parseinterval(enddate,0)))
  131
+    startdate = dateconverter(parseinterval(startdate, 0))
  132
+    enddate   = max(startdate, dateconverter(parseinterval(enddate,0)))
133 133
     
134 134
     if intervals is not None and not isinstance(intervals,Intervals):
135 135
         intervals = Intervals(intervals)
7  tests/regression/query/slice.py
@@ -66,4 +66,11 @@ def testSliceBack(self):
66 66
         q1 = qs[-2:-1]
67 67
         self.assertEqual(len(q1),1)
68 68
         self.assertEqual(q1[0].id,N-1)
  69
+        
  70
+    def testSliceGetField(self):
  71
+        '''test silve in conjunction with get_field method'''
  72
+        session = self.session()
  73
+        qs = session.query(self.model).get_field('id')
  74
+        q1 = qs[:2]
  75
+        self.assertEqual(len(q1), 2)
69 76
     

0 notes on commit 1fb4e4c

Please sign in to comment.
Something went wrong with that request. Please try again.