예제 #1
0
 def test_isEmpty(self, test):
     emp = StateSet()
     if not emp.isEmpty():
         test.fail("Empty state found non-empty")
     emp.add(pyatspi.STATE_PRESSED)
     if emp.isEmpty():
         test.fail("State incorrectly found empty")
예제 #2
0
파일: statetest.py 프로젝트: GNOME/pyatspi2
	def test_isEmpty(self, test):
		emp = StateSet()
		if not emp.isEmpty():
			test.fail("Empty state found non-empty")
		emp.add(pyatspi.STATE_PRESSED)
		if emp.isEmpty():
			test.fail("State incorrectly found empty")
예제 #3
0
    def test_compare(self, test):
        one = StateSet(*os)
        two = StateSet(*os)

        onemtwo = one.compare(two)
        if not onemtwo.isEmpty():
            test.fail("Equal states when compared yeilds non-empty state")

        one.add(pyatspi.STATE_ACTIVE)
        onemtwo = one.compare(two)

        act = StateSet(pyatspi.STATE_ACTIVE)
        if not onemtwo.equals(act):
            test.fail("Compared states do not yeild correct state")
예제 #4
0
파일: statetest.py 프로젝트: GNOME/pyatspi2
	def test_compare(self, test):
		one = StateSet(*os)
		two = StateSet(*os)

		onemtwo = one.compare(two)
		if not onemtwo.isEmpty():
			test.fail("Equal states when compared yeilds non-empty state")

		one.add(pyatspi.STATE_ACTIVE)
		onemtwo = one.compare(two)
		
		act = StateSet(pyatspi.STATE_ACTIVE)
		if not onemtwo.equals(act):
			test.fail("Compared states do not yeild correct state")
예제 #5
0
 def test_add(self, test):
     state = StateSet()
     state.add(pyatspi.STATE_PRESSED)
     if not state.contains(pyatspi.STATE_PRESSED):
         test.fail("State not added")
예제 #6
0
파일: statetest.py 프로젝트: GNOME/pyatspi2
	def test_add(self, test):
		state = StateSet()
		state.add(pyatspi.STATE_PRESSED)
		if not state.contains(pyatspi.STATE_PRESSED):
			test.fail("State not added")
예제 #7
0
 def getState(self):
     ss = StateSet()
     ss.add(STATE_SHOWING)
     return ss