-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
============================================================================== FAILURES ===============================================================================
_______________________________________________________ test_valid_schemas_files[tests/packages/cmake_defines] ________________________________________________________
filepath = PosixPath('/usr/ports/devel/py-scikit-build-core/work-py311/scikit_build_core-0.11.6/tests/packages/cmake_defines/pyproject.toml')
@pytest.mark.parametrize(
"filepath", SCHEMAS, ids=lambda x: str(x.relative_to(DIR.parent).parent)
)
def test_valid_schemas_files(filepath: Path) -> None:
api = pytest.importorskip("validate_pyproject.api")
with filepath.open("rb") as f:
example = tomllib.load(f)
validator = api.Validator()
> assert validator(example) is not None
^^^^^^^^^^^^^^^^^^
tests/test_schema.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.11/site-packages/validate_pyproject/api.py:283: in __call__
with detailed_errors():
/usr/local/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextmanager
def detailed_errors() -> Generator[None, None, None]:
try:
yield
except JsonSchemaValueException as ex:
> raise ValidationError._from_jsonschema(ex) from None
E validate_pyproject.error_reporting.ValidationError: `tool.scikit-build.cmake.define.ONE_LEVEL_LIST` must be valid exactly by one definition (0 matches found):
E
E - exactly one of the following:
E - {type: string}
E - {type: boolean}
E - type: table
E additional keys: False
E required: ['env']
E keys:
E 'env': {type: string, min length: 1}
E 'default':
E exactly one of the following:
E - {type: string}
E - {type: boolean}
/usr/local/lib/python3.11/site-packages/validate_pyproject/error_reporting.py:93: ValidationError
-------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------
INFO validate_pyproject.api:api.py:122 black.schema.get_schema defines `tool.black` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.cibuildwheel` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.hatch` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.mypy` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.pdm` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.poetry` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.pyright` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.ruff` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.scikit-build` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.setuptools_scm` schema
INFO validate_pyproject.api:api.py:122 validate_pyproject_schema_store.schema.get_schema defines `tool.uv` schema
________________________________________________________________ test_requires_command[True-editable] _________________________________________________________________
capsys = <_pytest.capture.CaptureFixture object at 0xc3c79445f50>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xc3c8a4de990>
tmp_path = PosixPath('/tmp/pytest-of-yuri/pytest-120/test_requires_command_True_edi0'), mode = 'editable', force_make = True
@pytest.mark.parametrize("mode", ["sdist", "wheel", "editable"])
@pytest.mark.parametrize("force_make", [False, True])
def test_requires_command(
capsys: pytest.CaptureFixture[str],
monkeypatch: pytest.MonkeyPatch,
tmp_path: Path,
mode: str,
force_make: bool,
) -> None:
monkeypatch.setattr(
sys, "argv", ["scikit_build_core.build", "requires", f"--mode={mode}"]
)
monkeypatch.setattr(shutil, "which", lambda _: None)
monkeypatch.delenv("CMAKE_GENERATOR", raising=False)
monkeypatch.delenv("CMAKE_ARGS", raising=False)
if force_make:
monkeypatch.setenv("CMAKE_GENERATOR", "Makefiles")
(tmp_path / "pyproject.toml").write_text(PYPROJECT_1)
monkeypatch.chdir(tmp_path)
main()
rich_warning.cache_clear()
out, err = capsys.readouterr()
> assert "CMakeLists.txt not found" in err
E AssertionError: assert 'CMakeLists.txt not found' in ''
/usr/ports/devel/py-scikit-build-core/work-py311/scikit_build_core-0.11.6/tests/test_build_cli.py:53: AssertionError
========================================================================== warnings summary ===========================================================================
tests/test_setuptools_pep517.py::test_toml_sdist
/usr/local/lib/python3.11/site-packages/wheel/bdist_wheel.py:4: DeprecationWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================= short test summary info =======================================================================
SKIPPED [1] tests/test_fortran.py:26: gfortran not available
SKIPPED [1] tests/test_program_search.py:18: could not import 'cmake': No module named 'cmake'
SKIPPED [1] tests/test_program_search.py:27: could not import 'ninja': No module named 'ninja'
SKIPPED [1] tests/test_pyproject_pep517.py:307: Doesn't work yet
SKIPPED [1] tests/test_builder.py:77: MSVC only
============================================= 2 failed, 460 passed, 5 skipped, 4 xfailed, 1 warning in 1152.80s (0:19:12) =============================================
Version: 0.11.6
Python-3.11
FreeBSD 14.3
Metadata
Metadata
Assignees
Labels
No labels