mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
Run all tests on the full frozen build using the frozen launcher
Much more comprehensive test coverage at the cost of slightly increasing the frozen build size.
This commit is contained in:
@@ -23,12 +23,13 @@ def itertests(suite: unittest.TestSuite) -> Generator[unittest.TestCase, None, N
|
||||
yield test
|
||||
|
||||
|
||||
def find_all_tests(package: str = '', excludes: Sequence[str] = ('main.py', 'gr.py')) -> unittest.TestSuite:
|
||||
def find_all_tests(package: str = '', excludes: Sequence[str] = ('main', 'gr')) -> unittest.TestSuite:
|
||||
suits = []
|
||||
if not package:
|
||||
package = __name__.rpartition('.')[0] if '.' in __name__ else 'kitty_tests'
|
||||
for x in contents(package):
|
||||
if x.endswith('.py') and x not in excludes:
|
||||
name, ext = os.path.splitext(x)
|
||||
if ext in ('.py', '.pyc') and name not in excludes:
|
||||
m = importlib.import_module(package + '.' + x.partition('.')[0])
|
||||
suits.append(unittest.defaultTestLoader.loadTestsFromModule(m))
|
||||
return unittest.TestSuite(suits)
|
||||
|
||||
Reference in New Issue
Block a user