mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
Force default_flow_style for pyyaml safe_dump
This is to keep behavior of pre-5.1 pyyaml.
This commit is contained in:
committed by
Claude Paroz
parent
ce7d887adc
commit
5ff4a55ae6
@@ -1092,6 +1092,17 @@ class YAMLTests(BaseTestCase):
|
||||
|
||||
self.assertEqual(_yaml, data.yaml)
|
||||
|
||||
def test_yaml_export(self):
|
||||
"""YAML export"""
|
||||
|
||||
expected = """\
|
||||
- {first_name: John, gpa: 90, last_name: Adams}
|
||||
- {first_name: George, gpa: 67, last_name: Washington}
|
||||
- {first_name: Thomas, gpa: 50, last_name: Jefferson}
|
||||
"""
|
||||
output = self.founders.yaml
|
||||
self.assertEqual(output, expected)
|
||||
|
||||
|
||||
class LatexTests(BaseTestCase):
|
||||
def test_latex_export(self):
|
||||
|
||||
Reference in New Issue
Block a user