def METHOD_NAME(self) -> None:
    """Test warn function."""
    # Reset global state
    SCons.Warnings._enabled = []
    SCons.Warnings._warningAsException = 0
    to = TestOutput()
    SCons.Warnings._warningOut=to
    SCons.Warnings.enableWarningClass(SCons.Warnings.SConsWarning)
    SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning,
                        "Foo")
    assert to.out == "Foo", to.out
    SCons.Warnings.warn(SCons.Warnings.DependencyWarning,
                        "Foo", 1)
    assert to.out == "('Foo', 1)", to.out