import unittest


def discover_and_run(test_dir: str = '.'):
    """Discover and run tests cases, returning the result."""
    loader = unittest.TestLoader()
    tests = loader.discover(test_dir)
    testRunner = unittest.runner.TextTestRunner()
    result = testRunner.run(tests)
    return result