Skip to content

Re-enable tests using Client get_projects() #1740

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

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions libs/labelbox/tests/integration/test_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def project_to_test_where(client, rand_gen):

# Avoid assertions using equality to prevent intermittent failures due to
# other builds simultaneously adding projects to test org
@pytest.mark.skip(
reason="broken due to get_projects HF for sunset-custom-editor")
def test_where(client, project_to_test_where):
p_a, p_b, p_c = project_to_test_where
p_a_name = p_a.name
Expand Down
12 changes: 3 additions & 9 deletions libs/labelbox/tests/integration/test_labeling_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,15 @@ def test_get_labeling_frontends(client):
assert len(filtered_frontends)


@pytest.mark.skip(
reason="broken due to get_projects HF for sunset-custom-editor")
def test_labeling_frontend_connecting_to_project(project):
client = project.client
default_labeling_frontend = next(
client.get_labeling_frontends(where=LabelingFrontend.name == "Editor"))

assert project.labeling_frontend(
) == default_labeling_frontend # we now have a default labeling frontend
assert project.labeling_frontend() is None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have reverted the back-end change that created a labeling editor automatically


frontend = list(project.client.get_labeling_frontends())[0]
project.labeling_frontend.connect(frontend)

project.labeling_frontend.connect(frontend)
project.labeling_frontend.connect(default_labeling_frontend)
assert project.labeling_frontend() == default_labeling_frontend

project.labeling_frontend.disconnect(frontend)
project.labeling_frontend.disconnect(default_labeling_frontend)
assert project.labeling_frontend() == None
2 changes: 0 additions & 2 deletions libs/labelbox/tests/integration/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ def delete_tag(tag_id: str):
delete_tag(tagB.uid)


@pytest.mark.skip(
reason="broken due to get_projects HF for sunset-custom-editor")
def test_project_filtering(client, rand_gen, data_for_project_test):
name_1 = rand_gen(str)
p1 = data_for_project_test(name_1)
Expand Down
Loading