~townsend/compiz/fix-auto-vp-switch-0.9.10

« back to all changes in this revision

Viewing changes to compizconfig/compizconfig-python/tests/test_setting.py

  • Committer: Sam Spilsbury
  • Date: 2012-10-16 13:53:20 UTC
  • mto: This revision was merged to the branch mainline in revision 3434.
  • Revision ID: sam.spilsbury@canonical.com-20121016135320-3zb8wy8u16eayb7m
Clean up the CMake code around the python modules and uninstalling
 - It isn't possible to build python extensions using distutils that
   link to things that we are building, because CMake provides no
   means for a custom command to depend on a library. Build them
   using CMake directly instead
 - Clean up the tests: the tests depended on having a working opengl
   and core plugin xml file and were also sensitive to xml data. Make
   a mock.xml and use that instead
 - Require ini for the compizconfig-python tests. They won't run without it
 - Fix the uninstall scripts. We were clobbering the uninstall target
   with the python uninstall targets, that is just plain wrong. Created
   a new cmake function to append custom uninstall scripts to the global
   uninstall script

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
    def runTest (self):
7
7
 
8
 
        plugin = self.context.Plugins['core']
9
 
        setting = self.ccs.Setting (plugin, 'active_plugins')
 
8
        plugin = self.context.Plugins["mock"]
 
9
        setting = self.ccs.Setting (plugin, "mock")
10
10
 
11
11
        self.assertEqual (setting.Plugin, plugin)
12
 
        self.assertEqual (setting.Name, 'active_plugins')
13
 
        self.assertEqual (setting.ShortDesc, 'Active Plugins')
14
 
        self.assertEqual (setting.LongDesc, 'List of currently active plugins')
15
 
        self.assertTrue (setting.Group is not None)
16
 
        self.assertTrue (setting.SubGroup is not None)
17
 
        self.assertEqual (setting.Type, "List")
18
 
        self.assertTrue (setting.Hints is not None)
19
 
        self.assertTrue (setting.DefaultValue is not None)
20
 
        self.assertTrue (setting.Value is not None)
 
12
        self.assertEqual (setting.Name, "mock")
 
13
        self.assertEqual (setting.ShortDesc, "Mock Setting")
 
14
        self.assertEqual (setting.LongDesc, "A Mock Setting")
 
15
        self.assertEqual (setting.Group, "A Mock Group")
 
16
        self.assertEqual (setting.SubGroup, "A Mock Subgroup")
 
17
        self.assertEqual (setting.Type, "String")
 
18
        self.assertEqual (setting.Hints, [])
 
19
        self.assertEqual (setting.DefaultValue, "Mock Value")
 
20
        self.assertEqual (setting.Value, "Mock Value")
21
21
        self.assertEqual (setting.Integrated, False)
22
22
        self.assertEqual (setting.ReadOnly, False)
23
23