Beispiel #1
0
 def test_empty(self):
     self.failUnless(jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
Beispiel #2
0
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
Beispiel #3
0
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
Beispiel #4
0
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))
Beispiel #5
0
 def test_empty(self):
     self.failUnless(
         jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
Beispiel #6
0
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
Beispiel #7
0
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
Beispiel #8
0
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))