Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Test runner for the WGSL template Python port.
 
Discovers ``test_*.py`` siblings and aggregates them into one suite.
Run manually, or via the ``WGSL Template Tests`` GitHub Actions workflow
(.github/workflows/wgsl_template_tests.yml).
"""
 
from __future__ import annotations
 
import sys
import unittest
from pathlib import Path
 
# Make the wgsl_template package importable regardless of cwd.
_THIS_DIR = Path(__file__).resolve().parent
_PARENT_DIR = _THIS_DIR.parent.parent
if str(_PARENT_DIR) not in sys.path:
    sys.path.insert(0, str(_PARENT_DIR))
 
 
def load_tests(loader, standard_tests, pattern):
    discovered = loader.discover(
        start_dir=str(_THIS_DIR),
        pattern="test_*.py",
        top_level_dir=str(_THIS_DIR),
    )
    standard_tests.addTests(discovered)
    return standard_tests
 
 
if __name__ == "__main__":  # pragma: no cover
    unittest.main(module=__name__, verbosity=2)