Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
command: | # Run test suite, uses NUCLEUS_TEST_API_KEY env variable
mkdir test_results
set -e
TEST_FILES=$(circleci tests glob "tests/**/test_*.py" | circleci tests split --split-by=timings)
poetry run coverage run --include=nucleus/* -m pytest -s -v --junitxml=test_results/junit.xml $TEST_FILES
TEST_FILES=$(circleci tests glob "tests/**/test_*.py")
echo "$TEST_FILES" | circleci tests run --command "xargs poetry run coverage run --include=nucleus/* -m pytest -s -v -o junit_family=legacy --junitxml=test_results/junit.xml" --verbose --split-by=timings
poetry run coverage report
poetry run coverage html
- store_test_results:
Expand All @@ -76,7 +76,7 @@ jobs:

pypi_publish:
docker:
- image: cimg/python:3.6
- image: cimg/python:3.7-buster
steps:
- checkout # checkout source code to working directory
- run:
Expand Down
10 changes: 5 additions & 5 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
]

TEST_POINTCLOUD_URLS = [
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-0.json",
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-1.json",
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-2.json",
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-3.json",
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-4.json",
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-0.json",
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-1.json",
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-2.json",
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-3.json",
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-4.json",
]

TEST_VIDEO_URL = "https://github.com/scaleapi/nucleus-python-client/raw/master/tests/testdata/video.mp4"
Expand Down
8 changes: 1 addition & 7 deletions tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ def test_repr(test_object: any):

def test_job_listing_and_retrieval(CLIENT):
jobs = CLIENT.list_jobs()

if not jobs:
return

for job in jobs:
assert eval(str(job)) == job

assert len(jobs) > 0, "No jobs found"
fetch_id = jobs[0].job_id
fetched_job = CLIENT.get_job(fetch_id)
assert fetched_job == jobs[0]
9 changes: 0 additions & 9 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@ def test_model_creation_and_listing(CLIENT, dataset):

assert model in ms

# Delete the model
CLIENT.delete_model(model.id)
time.sleep(
30
) # model deletion runs async TODO: do a correct job await here instead of sleep
ms = CLIENT.models

assert model not in ms


# Until we fully remove the other endpoints (and then migrate those tests) just quickly test the basics of the new ones since they are basically just simple wrappers around the old ones.
def test_new_model_endpoints(CLIENT, dataset: Dataset):
Expand Down
Loading