コード例 #1
0
ファイル: jsonops_tests.py プロジェクト: noway421/json4shell
 def test_out_of_range(self):
     self.failUnless(jsonops.array_head(range(3), 11) == jsonops.pprint([0, 1, 2]))
コード例 #2
0
ファイル: jsonops_tests.py プロジェクト: noway421/json4shell
 def test_one(self):
     self.failUnless(jsonops.array_head([1], 1) == jsonops.pprint([1]))
コード例 #3
0
ファイル: jsonops_tests.py プロジェクト: noway421/json4shell
 def test_normal(self):
     self.failUnless(jsonops.array_head(range(9), 3) == jsonops.pprint([0, 1, 2]))
コード例 #4
0
ファイル: jsonops_tests.py プロジェクト: noway421/json4shell
 def test_empty(self):
     self.failUnless(jsonops.array_head([], 1) == jsonops.pprint([]))