def testDoubleDict2(self): self.assertEqual(parser.loads("""\ a: b: c """), {'a': { 'b': 'c' }})
def testMultipleKeys(self): self.assertEqual(parser.loads(""" test: test_2: test-3: """), { "test": None, 'test_2': None, 'test-3': None })
def testMultiArray(self): self.assertEqual(parser.loads("""\ - - a: b c: 5 - a: 8 """), [[{'a':'b', 'c': 5}, {'a': 8}]])
def testMultiArray(self): self.assertEqual( parser.loads("""\ - - a: b c: 5 - a: 8 """), [[{ 'a': 'b', 'c': 5 }, { 'a': 8 }]])
def testOtherStringValue(self): self.assertEqual(parser.loads('t: "5"'), {'t': '5'})
def testSimpleStringValue(self): self.assertEqual(parser.loads('t: abcd'), {'t': 'abcd'})
def testOneArray(self): self.assertEqual(parser.loads('- a\n- b'), ['a', 'b'])
def testSimpleComment(self): self.assertEqual(parser.loads("""\ # This is a comment """), None)
def testOneKeyWithComment(self): self.assertEqual(parser.loads("""\ test: # This is the test Key """), {"test": None})
def testArrayOfDict(self): self.assertEqual(parser.loads("""\ - a: b """), [{'a': 'b'}])
def testIntegerValue(self): self.assertEqual(parser.loads("t: 5"), {'t': 5})
def testOnlyOneValue(self): self.assertEqual(parser.loads('5'), 5) self.assertEqual(parser.loads('a'), 'a') self.assertEqual(parser.loads('true'), True)
def testMultipleKeys(self): self.assertEqual(parser.loads(""" test: test_2: test-3: """), {"test": None, 'test_2': None, 'test-3': None})
def testMultiLines(self): self.assertEqual(parser.loads("\n"*5 + "test: # This is the test Key" + "\n" * 8), {"test": None})
def testStringValue(self): self.assertEqual(parser.loads("t: '5'"), {'t': '5'})
def testEmpty(self): self.assertEqual(parser.loads(""), None)
def testBoolValue(self): self.assertEqual(parser.loads("t: false"), {'t': False})
def testOneKey(self): self.assertEqual(parser.loads("""\ test: """), {"test": None})
def testInlineArrayValue(self): self.assertEqual(parser.loads("t: [4, 6]"), {'t': [4, 6]})
def testMultiLines(self): self.assertEqual( parser.loads("\n" * 5 + "test: # This is the test Key" + "\n" * 8), {"test": None})
def testArrayValue(self): self.assertEqual(parser.loads(""" test: - a - 5 """), {'test': ['a', 5]})
def testDoubleDict2(self): self.assertEqual(parser.loads("""\ a: b: c """), {'a': {'b': 'c'}})
def testOneKey(self): self.assertEqual(parser.loads("""\ test: """), {"test":None})
def testArrayOfDict(self): self.assertEqual(parser.loads("""\ - a: b """), [{'a':'b'}])