-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored ivy_tests package (#13186)
* refactored ivy_tests package * update submodule index * new line in conftest
- Loading branch information
Showing
25 changed files
with
511 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
[submodule "ivy_tests/test_array_api"] | ||
path = ivy_tests/test_array_api | ||
[submodule "ivy_tests/array_api_testing/test_array_api"] | ||
path = ivy_tests/array_api_testing/test_array_api | ||
url = https://github.com/data-apis/array-api-tests.git |
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from pytest import mark | ||
from pathlib import Path | ||
|
||
|
||
skip_ids = [] | ||
skips_path = Path(__file__).parent / "skips.txt" | ||
if skips_path.exists(): | ||
with open(skips_path) as f: | ||
for line in f: | ||
if line.startswith("ivy_tests"): | ||
id_ = line.strip("\n") | ||
skip_ids.append(id_) | ||
|
||
|
||
def pytest_collection_modifyitems(items): | ||
skip_ivy = mark.skip(reason="ivy skip - see ivy_tests/skips.txt for details") | ||
for item in items: | ||
# skip if specified in skips.txt | ||
for id_ in skip_ids: | ||
if item.nodeid.startswith(id_): | ||
item.add_marker(skip_ivy) | ||
break |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash -e | ||
python3 ivy_tests/write_array_api_tests_k_flag.py | ||
python3 ivy_tests/array_api_testing/write_array_api_tests_k_flag.py | ||
# shellcheck disable=SC2155 | ||
export ARRAY_API_TESTS_K_FLAG=$(cat ivy_tests/.array_api_tests_k_flag_$1) | ||
export ARRAY_API_TESTS_K_FLAG=$(cat ivy_tests/array_api_testing/.array_api_tests_k_flag_$1) | ||
if [ "$1" = "torch" ]; then | ||
ARRAY_API_TESTS_K_FLAG="${ARRAY_API_TESTS_K_FLAG} and not (uint16 or uint32 or uint64)" | ||
fi | ||
|
||
mkdir -p .hypothesis | ||
# shellcheck disable=SC2046 | ||
docker run --rm --env IVY_BACKEND="$1" --env ARRAY_API_TESTS_MODULE="ivy" --env REDIS_URL="$3" --env REDIS_PASSWD="$4" -v $(pwd):/ivy -v $(pwd)/.hypothesis:/.hypothesis unifyai/ivy:latest python3 -m pytest ivy_tests/test_array_api/array_api_tests/"$2".py -k "$ARRAY_API_TESTS_K_FLAG" --tb=short -vv | ||
docker run --rm --env IVY_BACKEND="$1" --env ARRAY_API_TESTS_MODULE="ivy" --env REDIS_URL="$3" --env REDIS_PASSWD="$4" -v $(pwd):/ivy -v $(pwd)/.hypothesis:/.hypothesis unifyai/ivy:latest python3 -m pytest ivy_tests/array_api_testing/test_array_api/array_api_tests/"$2".py -k "$ARRAY_API_TESTS_K_FLAG" --tb=short -vv |