'If the warning emitted by a function refers to a different file than is
passed to C{assertWarns}, C{failureException} is raised.'

def test_assertWarnsWrongFile(self):

    def deprecated(a):
        warnings.warn('Foo    deprecated', category=DeprecationWarning, stacklevel=2)
    self.assertRaises(self.failureException, self.assertWarns, DeprecationWarning, 'Foo    deprecated', __file__, deprecated, 123)
