コード例 #1
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_nest(self):
     self.assertEquals(
         shape.calculate_shape({
             'foo': [{
                 'bar': 1
             }, {
                 'bar': 2
             }],
             'baz': ({
                 'bamf': 'hello'
             }, 5)
         }), {
             'foo': [{
                 'bar': int
             }],
             'baz': ({
                 'bamf': str
             }, int)
         })
コード例 #2
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_list(self):
     self.assertEquals(
         shape.calculate_shape({'foo': ["one", "two", "three"]}),
         {'foo': [str]})
コード例 #3
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_tuple(self):
     self.assertEquals(shape.calculate_shape({'bar': (1, "hello", True)}),
                       {'bar': (int, str, bool)})
コード例 #4
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_simple(self):
     self.assertEquals(shape.calculate_shape(1), int)
コード例 #5
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_dict(self):
     self.assertEquals(shape.calculate_shape({'hello': 'world'}),
                       {'hello': str})
コード例 #6
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_nest(self):
     self.assertEquals(
         shape.calculate_shape(
             {'foo': [{'bar': 1}, {'bar': 2}],
             'baz': ({'bamf': 'hello'}, 5)}),
         {'foo': [{'bar': int}], 'baz': ({'bamf': str}, int)}) 
コード例 #7
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_tuple(self):
     self.assertEquals(
         shape.calculate_shape({'bar': (1, "hello", True)}),
         {'bar': (int, str, bool)})
コード例 #8
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_list(self):
     self.assertEquals(
         shape.calculate_shape({'foo': ["one", "two", "three"]}),
         {'foo': [str]})
コード例 #9
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_dict(self):
     self.assertEquals(
         shape.calculate_shape({'hello': 'world'}),
         {'hello': str})
コード例 #10
0
ファイル: shape_test.py プロジェクト: jeckhart/python-actors
 def test_simple(self):
     self.assertEquals(shape.calculate_shape(1), int)