Skip to content

Commit 5429ef7

Browse files
authored
1 parent 4ce5872 commit 5429ef7

File tree

6 files changed

+303
-481
lines changed

6 files changed

+303
-481
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ jobs:
5959
command: | # Run test suite, uses NUCLEUS_TEST_API_KEY env variable
6060
mkdir test_results
6161
set -e
62-
TEST_FILES=$(circleci tests glob "tests/**/test_*.py" | circleci tests split --split-by=timings)
63-
poetry run coverage run --include=nucleus/* -m pytest -s -v --junitxml=test_results/junit.xml $TEST_FILES
62+
TEST_FILES=$(circleci tests glob "tests/**/test_*.py")
63+
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
6464
poetry run coverage report
6565
poetry run coverage html
6666
- store_test_results:
@@ -76,7 +76,7 @@ jobs:
7676

7777
pypi_publish:
7878
docker:
79-
- image: cimg/python:3.6
79+
- image: cimg/python:3.7-buster
8080
steps:
8181
- checkout # checkout source code to working directory
8282
- run:

tests/helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
]
3535

3636
TEST_POINTCLOUD_URLS = [
37-
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-0.json",
38-
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-1.json",
39-
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-2.json",
40-
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-3.json",
41-
"https://scaleapi-cust-lidar.s3.us-west-1.amazonaws.com/test-scale/frame-4.json",
37+
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-0.json",
38+
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-1.json",
39+
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-2.json",
40+
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-3.json",
41+
"https://scale-dev.s3.us-west-2.amazonaws.com/nucleus/sdk/test_assets/frame-4.json",
4242
]
4343

4444
TEST_VIDEO_URL = "https://github.com/scaleapi/nucleus-python-client/raw/master/tests/testdata/video.mp4"

tests/test_jobs.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ def test_repr(test_object: any):
2525

2626
def test_job_listing_and_retrieval(CLIENT):
2727
jobs = CLIENT.list_jobs()
28-
29-
if not jobs:
30-
return
31-
32-
for job in jobs:
33-
assert eval(str(job)) == job
34-
28+
assert len(jobs) > 0, "No jobs found"
3529
fetch_id = jobs[0].job_id
3630
fetched_job = CLIENT.get_job(fetch_id)
3731
assert fetched_job == jobs[0]

tests/test_models.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ def test_model_creation_and_listing(CLIENT, dataset):
7676

7777
assert model in ms
7878

79-
# Delete the model
80-
CLIENT.delete_model(model.id)
81-
time.sleep(
82-
30
83-
) # model deletion runs async TODO: do a correct job await here instead of sleep
84-
ms = CLIENT.models
85-
86-
assert model not in ms
87-
8879

8980
# 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.
9081
def test_new_model_endpoints(CLIENT, dataset: Dataset):

0 commit comments

Comments
 (0)