diff options
| author | Joseph Herlant <aerostitch@users.noreply.github.com> | 2019-11-24 11:43:12 -0800 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2019-11-24 20:43:12 +0100 |
| commit | 5ff4a55ae6fb8a6f9d9d5d8ffeb2c5b8ffa51c85 (patch) | |
| tree | dcb6eae76b498b7a9d52787c5704d446027d8562 /tests | |
| parent | ce7d887adc753de33812fe5eb88a1f30be396a6e (diff) | |
| download | tablib-5ff4a55ae6fb8a6f9d9d5d8ffeb2c5b8ffa51c85.tar.gz | |
Force default_flow_style for pyyaml safe_dump
This is to keep behavior of pre-5.1 pyyaml.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/test_tablib.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_tablib.py b/tests/test_tablib.py index 87482e0..5754bb2 100755 --- a/tests/test_tablib.py +++ b/tests/test_tablib.py @@ -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): |
