def test_max(self): input_str = io.StringIO("""testpwd -5 asdfasdf 49949""") self.assertEqual( 49949, converter.PgsFile.max_in_dict( converter.PgsFile(input_str).as_dict()))
def test_gcolumn(self): input_str = io.StringIO(""""testpwd" 0.1 -5 asdfasdf 0.4 49949""") self.assertEqual({ '"testpwd"': '-5', 'asdfasdf': '49949' }, converter.PgsFile(input_str, 3).as_dict())
def test_as_dict_quote_char(self): input_str = io.StringIO(""""testpwd" -5 asdfasdf 49949""") self.assertEqual({ '"testpwd"': '-5', 'asdfasdf': '49949' }, converter.PgsFile(input_str).as_dict())
def test_as_tuples(self): input_str = io.StringIO("""testpwd -5 asdfasdf 49949""") self.assertEqual([('testpwd', '-5'), ('asdfasdf', '49949')], converter.PgsFile(input_str).as_tuples())