Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix REST API tests #5416

Merged
merged 10 commits into from
Dec 2, 2022
Merged

Fix REST API tests #5416

merged 10 commits into from
Dec 2, 2022

Conversation

Marishka17
Copy link
Contributor

@Marishka17 Marishka17 commented Dec 2, 2022

Motivation and context

Fixed REST API tests after merging #5408 and #5396 to develop

@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

❌ Some checks failed
📄 See logs here

@Marishka17
Copy link
Contributor Author

/check

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

❌ Some checks failed
📄 See logs here

@Marishka17 Marishka17 changed the title [WIP] Fix REST API tests Fix REST API tests Dec 2, 2022
Comment on lines 360 to 368
def find(tasks, skip_tasks=None):
def _is_task_with_shapes(t):
if (
skip_tasks is not None
and t["id"] in skip_tasks
or not annotations["task"][str(t["id"])]["shapes"]
):
return False
return True
Copy link
Contributor

@sizov-kirill sizov-kirill Dec 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use such solution?

Suggested change
def find(tasks, skip_tasks=None):
def _is_task_with_shapes(t):
if (
skip_tasks is not None
and t["id"] in skip_tasks
or not annotations["task"][str(t["id"])]["shapes"]
):
return False
return True
def find(tasks):
def _is_task_with_shapes(t):
if (
not t.get("data")
or not annotations["task"][str(t["id"])]["shapes"]
):
return False
return True

It won't make us always remember about skip_tasks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks

@sizov-kirill
Copy link
Contributor

@bsekachev Are these e2e tests unstable? Or are they related with this PR?

@bsekachev
Copy link
Member

@kirill-sizov

case_82_canvas3d_functionality_cuboid_opacity_outlined_borders.js

This one was fixed: #5409 (comment)

case_118_multi_tasks.js

Was quite stable before, not sure why it is failed here.

Copy link
Contributor

@sizov-kirill sizov-kirill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nmanovic nmanovic self-requested a review as a code owner December 2, 2022 20:24
@nmanovic nmanovic merged commit 9b0d963 into develop Dec 2, 2022
@nmanovic nmanovic deleted the mk/fix_tests branch December 2, 2022 21:49
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
Fixed REST API tests after merging cvat-ai#5408 and cvat-ai#5396 to develop

Co-authored-by: Boris Sekachev <sekachev.bs@gmail.com>
Co-authored-by: Nikita Manovich <nikita@cvat.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants