コード例 #1
0
ファイル: test_main.py プロジェクト: Riptawr/hdfs
 def test_parse_int_list(self):
   eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1])
   eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1,2])
コード例 #2
0
ファイル: test_main.py プロジェクト: Riptawr/hdfs
 def test_parse_int(self):
   eq_(parse_arg({'foo': '1'}, 'foo', int), 1)
   eq_(parse_arg({'foo': '1'}, 'foo', int, ','), 1)
コード例 #3
0
ファイル: test_main.py プロジェクト: Riptawr/hdfs
 def test_parse_float(self):
   eq_(parse_arg({'foo': '123.4'}, 'foo', float), 123.4)
コード例 #4
0
ファイル: test_main.py プロジェクト: Riptawr/hdfs
 def test_parse_invalid(self):
   parse_arg({'foo': 'a'}, 'foo', int)
コード例 #5
0
ファイル: test_main.py プロジェクト: wynhbh/hdfs
 def test_parse_int_list(self):
     eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1])
     eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1, 2])
コード例 #6
0
ファイル: test_main.py プロジェクト: wynhbh/hdfs
 def test_parse_float(self):
     eq_(parse_arg({'foo': '123.4'}, 'foo', float), 123.4)
コード例 #7
0
ファイル: test_main.py プロジェクト: wynhbh/hdfs
 def test_parse_int(self):
     eq_(parse_arg({'foo': '1'}, 'foo', int), 1)
     eq_(parse_arg({'foo': '1'}, 'foo', int, ','), 1)
コード例 #8
0
ファイル: test_main.py プロジェクト: wynhbh/hdfs
 def test_parse_invalid(self):
     parse_arg({'foo': 'a'}, 'foo', int)