예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 def test__pretty__should_put_quotes_around_string_parameters(self):
     init = 'y = "hello"'
     P = SimpleParameterSet(init)
     self.assertEqual(P.pretty(), init)
예제 #4
0
 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)
예제 #5
0
 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)
예제 #6
0
 def test__pretty__should_put_quotes_around_string_parameters(self):
     init = 'y = "hello"'
     P = SimpleParameterSet(init)
     self.assertEqual(P.pretty(), init)