diff --git a/pyproject.toml b/pyproject.toml index c8788bd..fd92373 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,20 +20,20 @@ module = ["ninja"] ignore_missing_imports = true -#[tool.pytest.ini_options] -#minversion = "6.0" -#addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] -#xfail_strict = true -#filterwarnings = [ -# "error", -# "ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest", -#] -#testpaths = ["tests"] -# -#[tool.cibuildwheel] -#test-command = "pytest {project}/tests" -#test-extras = ["test"] -#test-skip = ["*universal2:arm64"] +[tool.pytest.ini_options] +minversion = "6.0" +addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] +xfail_strict = true +filterwarnings = [ + "error", + "ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest", +] +testpaths = ["tests"] + +[tool.cibuildwheel] +test-command = "pytest {project}/tests" +test-extras = ["test"] +test-skip = ["*universal2:arm64"] # Setuptools bug causes collision between pypy and cpython artifacts before-build = "rm -rf {project}/build" diff --git a/tests/test.py b/tests/test.py deleted file mode 100644 index fac07fb..0000000 --- a/tests/test.py +++ /dev/null @@ -1,4 +0,0 @@ -import oasvalidator - -def test_validate(): - oasvalidator.init("thirdparty/cpp-oasvalidator/data/openAPI_example.json") \ No newline at end of file diff --git a/tests/test_basic.py b/tests/test_basic.py new file mode 100644 index 0000000..01a01f4 --- /dev/null +++ b/tests/test_basic.py @@ -0,0 +1,8 @@ +import oasvalidator + + +def test_validate(): + validators = oasvalidator.init("thirdparty/cpp-oasvalidator/data/openAPI_example.json") + error, error_msg = validators.validate_route("GET", "/v1/pets") + assert error == oasvalidator.ValidationError.INVALID_ROUTE +