From 4760354cb189915fd379f33bcf5fd2e0d15d8b3f Mon Sep 17 00:00:00 2001 From: David Doty Date: Mon, 24 Aug 2020 17:58:22 -0700 Subject: [PATCH] fixed unit test now that positions are automatically created in Helix when grid is None --- tests/scadnano_tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/scadnano_tests.py b/tests/scadnano_tests.py index 1b520a23..2c077e23 100644 --- a/tests/scadnano_tests.py +++ b/tests/scadnano_tests.py @@ -2617,10 +2617,12 @@ def test_lack_of_NoIndent_on_helix_if_position_or_major_ticks_present(self): self.assertFalse(isinstance(helix_json, sc.NoIndent)) self.assertTrue(isinstance(helix_json[sc.position_key], sc.NoIndent)) - def test_NoIndent_on_helix_without_position_or_major_ticks_present(self): + def test_NoIndent_on_helix_without_position_or_major_ticks_present(self) -> None: helices = [sc.Helix()] strands = [] - design = sc.Design(helices=helices, strands=strands) + # will only be NoIndent if we don't have a Helix.position field, so make sure one isn't created + # by choosing a grid + design = sc.Design(helices=helices, strands=strands, grid=sc.square) json_map = design.to_json_serializable(suppress_indent=True) helix_json = json_map[sc.helices_key][0] self.assertTrue(isinstance(helix_json, sc.NoIndent))