コード例 #1
0
class PresetManagerTest(unittest.TestCase):
    """ Test the PresetManager class.
    """
    __presets = PresetManager().getPresets()

    def setUp(self):
        """ Build context (before each xxxTest() method call)
        """

    def tearDown(self):
        """ Cleanup contaxt ((before each xxxTest() method call)
        """

    def testAll(self):
        for preset in PresetManagerTest.__presets.getAll():
            print preset
            for yaw, pitch in preset.iterPositions():
                print "yaw=%5.1f, pitch=%5.1f" % (yaw, pitch)
コード例 #2
0
 def __init__(self, *args, **kwargs):
     """ Init the Preset object.
     """
     super(PresetScan, self).__init__(*args, **kwargs)
     self.__presets = PresetManager().getPresets()