629
629
self.failUnless(len(devices) == 2, 'Only 2 Device sections should be found!')
631
def testIsDriverEnabled(self):
631
def testIsDriverEnabled1(self):
633
isDriverEnabled(self, driver)
633
isDriverEnabled1(self, driver)
635
635
self.this_function_name = sys._getframe().f_code.co_name
687
687
self.parser = xutils.XUtils(tempFile)
688
688
enabled = self.parser.isDriverEnabled('foo')
690
self.failUnless(enabled == False, 'The driver should not be enabled!')
692
enabled = self.parser.isDriverEnabled('bar')
693
self.failUnless(enabled == False, 'The driver should not be enabled!')
695
def testIsDriverEnabled2(self):
697
isDriverEnabled2(self, driver)
699
self.this_function_name = sys._getframe().f_code.co_name
701
confFile = open(tempFile, 'w')
702
print >> confFile, '''
704
Identifier "Default Video Device"
709
Identifier "Another Video Device"
714
self.parser = xutils.XUtils(tempFile)
715
enabled = self.parser.isDriverEnabled('foo')
717
self.failUnless(enabled == False, 'The driver should not be enabled!')
719
enabled = self.parser.isDriverEnabled('bar')
720
self.failUnless(enabled == False, 'The driver should not be enabled!')
722
def testIsDriverEnabled3(self):
724
isDriverEnabled3(self, driver)
726
self.this_function_name = sys._getframe().f_code.co_name
728
confFile = open(tempFile, 'w')
729
print >> confFile, '''
731
Identifier "Default Video Device"
736
Identifier "Another Video Device"
741
Identifier "Yet Another Video Device"
746
Identifier "Default Screen Device"
747
Device "Default Video Device"
751
Identifier "New Screen Device"
752
Device "Yet Another Video Device"
756
Identifier "Another Screen Device"
757
Device "Another Video Device"
760
Section "ServerLayout"
761
Identifier "A Layout"
763
Screen "Default Screen Device" 0 0
764
Screen "Another Screen Device" RightOf "Default Screen Device"
768
self.parser = xutils.XUtils(tempFile)
769
enabled = self.parser.isDriverEnabled('foo')
690
771
self.failUnless(enabled == True, 'The driver should be enabled!')
692
enabled = self.parser.isDriverEnabled('foobar')
773
enabled = self.parser.isDriverEnabled('bar')
693
774
self.failUnless(enabled == False, 'The driver should not be enabled!')
696
776
def testGetScreenDeviceRelationships(self):