def test__pretty__output_should_be_useable_to_create_an_identical_parameterset(self): init = "x = 2\ny = 3\nz = 'hello'" P1 = SimpleParameterSet(init) P2 = SimpleParameterSet(P1.pretty()) self.assertEqual(P1.values, P2.values)
def test__pretty__should_recreate_comments_in_the_initializer(self): init = 'x = 2 # this is a comment' P = SimpleParameterSet(init) self.assertEqual(P.pretty(), init)
def test__pretty__should_put_quotes_around_string_parameters(self): init = 'y = "hello"' P = SimpleParameterSet(init) self.assertEqual(P.pretty(), init)
def test__pretty__output_should_be_useable_to_create_an_identical_parameterset( self): init = "x = 2\ny = 3\nz = 'hello'" P1 = SimpleParameterSet(init) P2 = SimpleParameterSet(P1.pretty()) self.assertEqual(P1.values, P2.values)