Skip to content

Commit

Permalink
Move exclusion to hopefully correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
binste committed May 18, 2024
1 parent f85fd0d commit c179291
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ max-complexity = 18
markers = [
"save_engine: marks some of the tests which are using an external package to save a chart to e.g. a png file. This mark is used to run those tests selectively in the build GitHub Action.",
]
# Pytest does not need to search these folders for test functions.
# They contain examples which are being executed by the
# test_examples tests.
norecursedirs = ["tests/examples_arguments_syntax", "tests/examples_methods_syntax"]

[tool.mypy]
warn_unused_ignores = true
Expand Down
8 changes: 1 addition & 7 deletions tests/examples_arguments_syntax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ def iter_examples_arguments_syntax():
examples_arguments_syntax_dir = os.path.abspath(os.path.dirname(__file__))
for filename in os.listdir(examples_arguments_syntax_dir):
name, ext = os.path.splitext(filename)
if (
name.startswith("_")
or ext != ".py"
# Temporarily skip this test until https://github.com/vega/altair/issues/3418
# is fixed
or name == "interval_selection_map_quakes"
):
if name.startswith("_") or ext != ".py":
continue
yield {
"name": name,
Expand Down
8 changes: 1 addition & 7 deletions tests/examples_methods_syntax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ def iter_examples_methods_syntax():
examples_methods_syntax_dir = os.path.abspath(os.path.dirname(__file__))
for filename in os.listdir(examples_methods_syntax_dir):
name, ext = os.path.splitext(filename)
if (
name.startswith("_")
or ext != ".py"
# Temporarily skip this test until https://github.com/vega/altair/issues/3418
# is fixed
or name == "interval_selection_map_quakes"
):
if name.startswith("_") or ext != ".py":
continue
yield {
"name": name,
Expand Down
8 changes: 7 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@

def iter_examples_filenames(syntax_module):
for _importer, modname, ispkg in pkgutil.iter_modules(syntax_module.__path__):
if ispkg or modname.startswith("_"):
if (
ispkg
or modname.startswith("_")
# Temporarily skip this test until https://github.com/vega/altair/issues/3418
# is fixed
or modname == "interval_selection_map_quakes"
):
continue
yield modname + ".py"

Expand Down

0 comments on commit c179291

Please sign in to comment.