From b1349e6ba7645204bff61d44636d59663a1ce11a Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Sat, 16 Oct 2021 12:36:12 +1100 Subject: [PATCH] Improve complex test --- tests/test_complex.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_complex.py b/tests/test_complex.py index bd70682..bfa0932 100644 --- a/tests/test_complex.py +++ b/tests/test_complex.py @@ -1,6 +1,6 @@ from pathlib import Path -from cuddle import dumps, load +from cuddle import dumps, load, loads fixtures_path = Path(__file__).parent @@ -13,4 +13,9 @@ def test_from_file(): doc = load(before_formatting_file) formatted_doc = after_formatting_file.read_text() - assert dumps(doc) == formatted_doc + dumped_doc = dumps(doc) + assert dumped_doc == formatted_doc + + reloaded_doc = loads(dumped_doc) + redumped_doc = dumps(reloaded_doc) + assert redumped_doc == dumped_doc