-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test GUI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
|
||
jobs: | ||
test-gui: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Install uxsim and dependencies | ||
run: pip install . | ||
- name: Install pytest other dependencies | ||
run: pip install pytest setuptools | ||
- name: Run test with pytest | ||
run: pytest tests/test_submodule_search.py --durations=0 -v -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pkgutil | ||
import importlib | ||
|
||
def print_submodules(package_name): | ||
package = importlib.import_module(package_name) | ||
print(f"Submodules in {package_name}:") | ||
for importer, modname, ispkg in pkgutil.walk_packages(package.__path__, prefix=package.__name__+'.'): | ||
print(modname) | ||
|
||
# 例: 'your_package_name' を探索したいパッケージの名前に置き換えてください | ||
def test_search: | ||
print_submodules('uxsim') | ||
|