mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 10:23:16 -05:00
docs: install markdown with the test dependencies
CONTRIBUTING and the testing guide installed pyyaml and jsonschema only, while the CI test job also installs markdown. On a contributor's machine the wiki heading test skipped and the run read OK. Both name it now, and a test compares them to the packages the tests import.
This commit is contained in:
1 parent
392a5d68cc
commit
b402a8b917
4 files changed
+23
-7
No files matched your search
+1
-1
@@ -44,7 +44,7 @@ Full walkthrough: [profiling guide](https://abdess.github.io/retrobios/wiki/prof
|
||||
The checks CI runs on a pull request (Python 3.12 or newer):
|
||||
|
||||
```bash
|
||||
pip install pyyaml "jsonschema[format-nongpl]"
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown
|
||||
python scripts/validate_pr.py --changed # the BIOS files the branch adds
|
||||
python scripts/validate_schemas.py --source-only # profiles and platform files
|
||||
python scripts/profile_sync.py --emulator NAME --strict # each profile the branch adds
|
||||
|
||||
@@ -729,7 +729,7 @@ Full walkthrough: [profiling guide]({link("wiki/profiling")}).
|
||||
The checks CI runs on a pull request (Python 3.12 or newer):
|
||||
|
||||
```bash
|
||||
pip install pyyaml "jsonschema[format-nongpl]"
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown
|
||||
python scripts/validate_pr.py --changed # the BIOS files the branch adds
|
||||
python scripts/validate_schemas.py --source-only # profiles and platform files
|
||||
python scripts/profile_sync.py --emulator NAME --strict # each profile the branch adds
|
||||
|
||||
@@ -202,6 +202,22 @@ class EveryTestDependencyIsInstalledInCi(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(missing, [])
|
||||
|
||||
def test_a_contributor_installs_what_ci_installs(self):
|
||||
# The contributing page installed pyyaml and jsonschema only, so the
|
||||
# markdown test skipped on a contributor's machine and ran in CI.
|
||||
from generate_readme import generate_contributing
|
||||
|
||||
command = next(
|
||||
line for line in generate_contributing().splitlines() if "pip install" in line
|
||||
)
|
||||
guide = (Path(__file__).resolve().parents[1] / "wiki" / "testing-guide.md").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
for package in self.PACKAGES.values():
|
||||
with self.subTest(package=package):
|
||||
self.assertIn(package, command)
|
||||
self.assertIn(package, guide)
|
||||
|
||||
|
||||
|
||||
class TheTestingGuideNamesEveryModule(unittest.TestCase):
|
||||
|
||||
@@ -25,11 +25,11 @@ python -m unittest tests.test_install tests.test_install_cores -v
|
||||
The table below says which module covers what.
|
||||
|
||||
Running the build needs Python 3.12 and `pyyaml` alone, and so does most of the suite. The
|
||||
schema contract tests also need `jsonschema[format-nongpl]`, which the CI
|
||||
installs: without it they are reported as skipped, so install it before a pull
|
||||
request that touches a profile, a platform file or a schema
|
||||
(`pip install "jsonschema[format-nongpl]"`). No test framework beyond the
|
||||
standard library `unittest` module.
|
||||
schema contract tests also need `jsonschema[format-nongpl]`, and one site test
|
||||
renders a wiki line with `markdown`. The CI installs both: without them those
|
||||
tests are reported as skipped, so install them before a pull request
|
||||
(`pip install "jsonschema[format-nongpl]" markdown`). No test framework beyond
|
||||
the standard library `unittest` module.
|
||||
|
||||
## Modules at a glance
|
||||
|
||||
|
||||
Reference in new issue
Block a user