def callback_scintillawrapper_int_void_position(self, args): x = editor.pointXFromPosition(6) # X position of the W y = editor.pointYFromPosition(6) position = editor.positionFromPoint(x, y) self.assertEqual(position, 6) self.callbackCalled = True
def test_scintillawrapper_position_int_int(self): editor.write('Hello World'); x = editor.pointXFromPosition(6) # X position of the W y = editor.pointYFromPosition(6) position = editor.positionFromPoint(x, y) self.assertEqual(position, 6)
def test_scintillawrapper_int_void_position(self): # This test is actually identical to position_int_int # That test is for positionFromPoint(), this is for pointXFromPosition() # I'm leaving this in, so we've definitely got a covering test for int_void_position editor.write('Hello World'); x = editor.pointXFromPosition(6) # X position of the W y = editor.pointYFromPosition(6) position = editor.positionFromPoint(x, y) self.assertEqual(position, 6)