예제 #1
0
 def test_map_type(self) -> None:
     c = customized(map_type={1: 2, 3: 6, 5: 10})
     res = {}
     for k, v in c.map_type.items():
         res[k] = v
     self.assertEquals(res, {1: 2, 3: 6, 5: 10})
예제 #2
0
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
예제 #3
0
 def test_list_type(self) -> None:
     c = customized(list_type=[1, 2, 3])
     res = []
     for v in c.list_type:
         res.append(v)
     self.assertEquals(res, [1, 2, 3])
예제 #4
0
 def test_set_type(self) -> None:
     c = customized(set_type={1, 2, 3})
     res = set()
     for v in c.set_type:
         res.add(v)
     self.assertEquals(res, {1, 2, 3})
예제 #5
0
파일: custom.py 프로젝트: facebook/fbthrift
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
예제 #6
0
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
예제 #7
0
파일: custom.py 프로젝트: facebook/fbthrift
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
예제 #8
0
파일: custom.py 프로젝트: facebook/fbthrift
 def test_map_type(self) -> None:
     c = customized(map_type={1: 2, 3: 6, 5: 10})
     res = {}
     for k, v in c.map_type.items():
         res[k] = v
     self.assertEquals(res, {1: 2, 3: 6, 5: 10})
예제 #9
0
파일: custom.py 프로젝트: facebook/fbthrift
 def test_set_type(self) -> None:
     c = customized(set_type={1, 2, 3})
     res = set()
     for v in c.set_type:
         res.add(v)
     self.assertEquals(res, {1, 2, 3})
예제 #10
0
파일: custom.py 프로젝트: facebook/fbthrift
 def test_list_type(self) -> None:
     c = customized(list_type=[1, 2, 3])
     res = []
     for v in c.list_type:
         res.append(v)
     self.assertEquals(res, [1, 2, 3])
예제 #11
0
파일: custom.py 프로젝트: ktprime/fbthrift
 def test_list_of_uint32(self) -> None:
     c = customized(list_of_uint32=[1, 2, 3])
     self.assertEqual(c.list_of_uint32, [1, 2, 3])