예제 #1
0
 def test_default_output(self):
     ret = yaml.output(self.data)
     expect = "example: one\ntest: two\n"
     self.assertEqual(expect, ret)
예제 #2
0
 def test_negative_int_output(self):
     with patch.dict(yaml.__opts__, {"output_indent": -1}):
         ret = yaml.output(self.data)
         expect = "{example: one, test: two}\n"
         self.assertEqual(expect, ret)
예제 #3
0
 def test_negative_int_output(self):
     yaml.__opts__['output_indent'] = -1
     ret = yaml.output(self.data)
     expect = '{example: one, test: two}\n'
     self.assertEqual(expect, ret)