Call a function that should have been deprecated at a specific version and in favor of a specific alternative, and assert that it was thusly deprecated.

ParametersversionA 2-sequence of (since, replacement), where since is a the first version that f should have been deprecated since, and replacement is a suggested replacement for the deprecated functionality, as described by twisted.python.deprecate.deprecated. If there is no suggested replacement, this parameter may also be simply a version by itself.
fThe deprecated function to call.
argsThe arguments to pass to f.
kwargsThe keyword arguments to pass to f.
ReturnsWhatever f returns.
RaisesWhatever f raises. If any exception is raised by f, though, no assertions will be made about emitted deprecations.
FailTestif no warnings were emitted by f, or if the DeprecationWarning emitted did not produce the canonical please-use-something-else message that is standard for Twisted deprecations according to the given version and replacement.
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.