コード例 #1
0
 def testMakeControl(self):
     """Test making a C++ Control object from a Config object."""
     config = testLib.ConfigObject()
     config.foo = 2
     config.bar.append("baz")
     control = config.makeControl()
     self.assertTrue(testLib.checkControl(control, config.foo, config.bar.list()))
コード例 #2
0
ファイル: test_wrap.py プロジェクト: lsst/pex_config
 def testDefaults(self):
     """Test that C++ Control object defaults are correctly used as defaults
     for Config objects."""
     config = testLib.ConfigObject()
     control = testLib.ControlObject()
     self.assertTrue(
         testLib.checkControl(control, config.foo, config.bar.list()))
コード例 #3
0
 def testMakeControl(self):
     """Test making a C++ Control object from a Config object."""
     config = testLib.ConfigObject()
     config.foo = 2
     config.bar.append("baz")
     control = config.makeControl()
     self.assertTrue(testLib.checkControl(control, config.foo, config.bar.list()))
コード例 #4
0
 def testReadControl(self):
     """Test reading the values from a C++ Control object into a Config object."""
     control = testLib.ControlObject()
     control.foo = 3
     control.bar = ["zot", "yox"]
     config = testLib.ConfigObject()
     config.readControl(control)
     self.assertTrue(testLib.checkControl(control, config.foo, config.bar.list()))
コード例 #5
0
 def testReadControl(self):
     """Test reading the values from a C++ Control object into a Config object."""
     control = testLib.ControlObject()
     control.foo = 3
     control.bar = ["zot", "yox"]
     config = testLib.ConfigObject()
     config.readControl(control)
     self.assertTrue(testLib.checkControl(control, config.foo, config.bar.list()))
コード例 #6
0
 def testReadControl(self):
     """Test reading the values from a C++ Control object into a Config object."""
     vec = testLib.StringVec()
     vec.push_back("zot")
     vec.push_back("yox")
     control = testLib.ControlObject()
     control.foo = 3
     control.bar = vec
     config = testLib.ConfigObject()
     config.readControl(control)
     self.assert_(testLib.checkControl(control, config.foo, config.bar))
コード例 #7
0
 def testDefaults(self):
     """Test that C++ Control object defaults are correctly used as defaults for Config objects."""
     config = testLib.ConfigObject()
     control = testLib.ControlObject()
     self.assertTrue(testLib.checkControl(control, config.foo, config.bar.list()))