File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 99import importlib
1010import logging
1111import sys
12+ from os import getenv
1213
1314import pytest
1415from click .testing import CliRunner
2425
2526logger = logging .getLogger ("mkdocs" )
2627
28+
29+ # if docs are generated while FAST_DOCS is true, then use "tests/frontier" otherwise use "tests"
30+ # USAGE 1 (use fast mode):
31+ # export FAST_DOCS=true && uv run mkdocs serve
32+ # USAGE 2 (use fast mode + hide side-effect warnings):
33+ # export FAST_DOCS=true && uv run mkdocs serve 2>&1 | sed '/is not found among documentation files/d' # noqa: E501
34+ test_arg = "tests"
35+ fast_mode = getenv ("FAST_DOCS" )
36+ if fast_mode is not None :
37+ if fast_mode .lower () == "true" :
38+ print ("-" * 40 , "\n Will generate docs using FAST_DOCS mode.\n " + "-" * 40 )
39+ test_arg = "tests/frontier"
40+
2741args = [
2842 "--override-ini" ,
2943 "filterwarnings=ignore::pytest.PytestAssertRewriteWarning" , # suppress warnings due to reload
3650 "-m" ,
3751 "(not blockchain_test_engine) and (not eip_version_check)" ,
3852 "-s" ,
39- "tests" ,
40- # "tests/shanghai",
41- # "tests/osaka/eip7692_eof_v1", # noqa: SC100
42- # "tests/prague/eip2537_bls_12_381_precompiles", # noqa: SC100
53+ test_arg ,
4354]
4455
4556runner = CliRunner ()
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ commands = python -c "import src.cli.tox_helpers; src.cli.tox_helpers.markdownli
4242description = Build documentation in strict mode (mkdocs)
4343extras = docs
4444setenv =
45- SPEC_TESTS_AUTO_GENERATE_FILES = true
4645 GEN_TEST_DOC_VERSION = " tox"
4746 # Required for `cairosvg` so tox can find `libcairo-2`.
4847 # https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/?h=cairo#cairo-library-was-not-found
You can’t perform that action at this time.
0 commit comments