def test_default_output(self): ret = yaml.output(self.data) expect = "example: one\ntest: two\n" self.assertEqual(expect, ret)
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)
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)