def insertIndent():
            if self.useTabs:
                cursor.insertText('\t')
            else:  # indent to integer count of indents from line start
                charsToInsert = self.width - (len(self._qpart.textBeforeCursor()) % self.width)
                cursor.insertText(' ' * charsToInsert)
def test_optional_arguments(self):
        self.assertEqual(self.myfunc('a'), self.expected)
        self.assertEqual(self.myfunc('a', 5), self.expected)
        self.assertEqual(self.myfunc('a', second=5), self.expected)
        self.assertEqual(self.myfunc('a', 5, 5), self.expected)
        self.assertEqual(self.myfunc('a', fourth=[]), self.expected)