Example #1
0
 def invalid():
     # noinspection PyTypeChecker
     _ = is_clippy_command(text)
Example #2
0
 def test_is_not_clippy_command(self):
     self.assertFalse(is_clippy_command(not_clippy_method))
Example #3
0
    def test_no_clippy_attribute(self):
        def not_clippy_function():
            return True

        self.assertFalse(is_clippy_command(not_clippy_function))
Example #4
0
 def test_is_clippy_command(self):
     self.assertTrue(is_clippy_command(clippy_method))
Example #5
0
    def test_clippy_attribute(self):
        @clippy
        def clippy_function():
            return True

        self.assertTrue(is_clippy_command(clippy_function))