コード例 #1
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.array_enumerate([], "4") == jsonops.pprint({}))
コード例 #2
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_strings(self):
     self.failUnless(
         jsonops.object_get({
             "f": "b",
             "z": "q"
         }, "z") == jsonops.pprint("q"))
コード例 #3
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
コード例 #4
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.array_tail([], "1") == jsonops.pprint([]))
コード例 #5
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_tail(range(9), "7") == jsonops.pprint([7, 8]))
コード例 #6
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
コード例 #7
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_head(range(9), "3") == jsonops.pprint([0, 1, 2]))
コード例 #8
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(
         jsonops.array_tail([1], "0") == jsonops.pprint([1]))
コード例 #9
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_tail(range(9), "7") == jsonops.pprint([7, 8]))
コード例 #10
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_head(range(3), "11") == jsonops.pprint([0, 1, 2]))
コード例 #11
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(
         jsonops.array_tail([], "1") == jsonops.pprint([]))
コード例 #12
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_head(range(9), "3") == jsonops.pprint([0, 1, 2]))
コード例 #13
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(
         jsonops.array_head([1], "1") == jsonops.pprint([1]))
コード例 #14
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_reverse_range(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[9:1]") == jsonops.pprint([]))
コード例 #15
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
コード例 #16
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_tail(range(3), "7") == jsonops.pprint([]))
コード例 #17
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal_slice(self):
     self.failUnless(
         jsonops.array_slice(range(10), "[3:5]") == jsonops.pprint([3, 4]))
コード例 #18
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_strings(self):
     self.failUnless(
         jsonops.object_get({"f": "b", "z": "q"}, "z")
         == jsonops.pprint("q"))
コード例 #19
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(jsonops.array_head([1], "1") == jsonops.pprint([1]))
コード例 #20
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.object_values({}) == jsonops.pprint([]))
コード例 #21
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_head(range(3), "11") == jsonops.pprint([0, 1, 2]))
コード例 #22
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(
         jsonops.array_slice([], "[1:2]") == jsonops.pprint([]))
コード例 #23
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(jsonops.array_tail([1], "0") == jsonops.pprint([1]))
コード例 #24
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.object_values({"1": "a", "2": "b"})
         == jsonops.pprint(["a", "b"]))
コード例 #25
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_out_of_range(self):
     self.failUnless(
         jsonops.array_tail(range(3), "7") == jsonops.pprint([]))
コード例 #26
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.array_enumerate([], "4") == jsonops.pprint({}))
コード例 #27
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_empty(self):
     self.failUnless(jsonops.object_values({}) == jsonops.pprint([]))
コード例 #28
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_enumerate({"a", "b"}, "4")
         == jsonops.pprint({4: "a", 5: "b"}))
コード例 #29
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.object_values({
             "1": "a",
             "2": "b"
         }) == jsonops.pprint(["a", "b"]))
コード例 #30
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))
コード例 #31
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_normal(self):
     self.failUnless(
         jsonops.array_enumerate({"a", "b"}, "4") == jsonops.pprint({
             4: "a",
             5: "b"
         }))
コード例 #32
0
ファイル: jsonops_tests.py プロジェクト: GreyCat/json4shell
 def test_one(self):
     self.failUnless(
         jsonops.array_slice([1], "[0:1]") == jsonops.pprint([1]))