예제 #1
0
 def test_empty(self):
     self.failUnless(jsonops.array_enumerate([], "4") == jsonops.pprint({}))
예제 #2
0
 def test_strings(self):
     self.failUnless(
         jsonops.object_get({
             "f": "b",
             "z": "q"
         }, "z") == jsonops.pprint("q"))
예제 #3
0
 def test_empty(self):
     self.failUnless(jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
예제 #4
0
 def test_empty(self):
     self.failUnless(jsonops.array_tail([], "1") == jsonops.pprint([]))
예제 #5
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_tail(range(9), "7") == jsonops.pprint([7, 8]))
예제 #6
0
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
예제 #7
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_head(range(9), "3") == jsonops.pprint([0, 1, 2]))
예제 #8
0
 def test_one(self):
     self.failUnless(
         jsonops.array_tail([1], "0") == jsonops.pprint([1]))
예제 #9
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_tail(range(9), "7") == jsonops.pprint([7, 8]))
예제 #10
0
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_head(range(3), "11") == jsonops.pprint([0, 1, 2]))
예제 #11
0
 def test_empty(self):
     self.failUnless(
         jsonops.array_tail([], "1") == jsonops.pprint([]))
예제 #12
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_head(range(9), "3") == jsonops.pprint([0, 1, 2]))
예제 #13
0
 def test_one(self):
     self.failUnless(
         jsonops.array_head([1], "1") == jsonops.pprint([1]))
예제 #14
0
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
예제 #15
0
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
예제 #16
0
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_tail(range(3), "7") == jsonops.pprint([]))
예제 #17
0
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
예제 #18
0
 def test_strings(self):
     self.failUnless(
         jsonops.object_get({"f": "b", "z": "q"}, "z")
         == jsonops.pprint("q"))
예제 #19
0
 def test_one(self):
     self.failUnless(jsonops.array_head([1], "1") == jsonops.pprint([1]))
예제 #20
0
 def test_empty(self):
     self.failUnless(jsonops.object_values({}) == jsonops.pprint([]))
예제 #21
0
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_head(range(3), "11") == jsonops.pprint([0, 1, 2]))
예제 #22
0
 def test_empty(self):
     self.failUnless(
         jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
예제 #23
0
 def test_one(self):
     self.failUnless(jsonops.array_tail([1], "0") == jsonops.pprint([1]))
예제 #24
0
 def test_normal(self):
     self.failUnless(
         jsonops.object_values({"1": "a", "2": "b"})
         == jsonops.pprint(["a", "b"]))
예제 #25
0
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_tail(range(3), "7") == jsonops.pprint([]))
예제 #26
0
 def test_empty(self):
     self.failUnless(jsonops.array_enumerate([], "4") == jsonops.pprint({}))
예제 #27
0
 def test_empty(self):
     self.failUnless(jsonops.object_values({}) == jsonops.pprint([]))
예제 #28
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_enumerate({"a", "b"}, "4")
         == jsonops.pprint({4: "a", 5: "b"}))
예제 #29
0
 def test_normal(self):
     self.failUnless(
         jsonops.object_values({
             "1": "a",
             "2": "b"
         }) == jsonops.pprint(["a", "b"]))
예제 #30
0
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))
예제 #31
0
 def test_normal(self):
     self.failUnless(
         jsonops.array_enumerate({"a", "b"}, "4") == jsonops.pprint({
             4: "a",
             5: "b"
         }))
예제 #32
0
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))