void () { myFixture.configureByText(PythonFileType.INSTANCE, """ def getstatus(file): ""\"Return output of "ls -ld <file>" in a string.""\" import warnings warnings.warn("commands.getstatus() is deprecated", DeprecationWarning, 2) return getoutput('ls -ld' + mkarg(file))"""); PyFunction getstatus = ((PyFile) myFixture.getFile()).findTopLevelFunction("getstatus"); assertEquals("commands.getstatus() is deprecated", getstatus.getDeprecationMessage()); }