class MyTest(unittest.TestCase, CustomAssertions):

    def test_file_exists(self):
        self.assertFileExists('any/file/path')
if __name__ == '__main__':
    unittest.main()
How to write a custom `.assertFoo()` method in Python?