Skip to content

Conversation

@kkim-labelbox
Copy link
Contributor

No description provided.

@kkim-labelbox kkim-labelbox requested review from a team, gszpak and olegtrygub October 21, 2022 00:31


@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") is None,
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY") == "",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be:
@pytest.mark.skipif(os.environ.get("DA_GCP_LABELBOX_API_KEY"))
That way this test doesn't run if either the env var is not set or if it is set to an empty string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

skipif only accepts boolean as the condition, so I am doing not os.environ.get("DA_GCP_LABELBOX_API_KEY") instead, which should evaluate to false for empty string and 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.

Good call nonetheless!

@msokoloff1 msokoloff1 self-requested a review October 24, 2022 17:36
@kkim-labelbox kkim-labelbox merged commit c7b0623 into develop Oct 25, 2022
@kkim-labelbox kkim-labelbox deleted the kkim/polish-tests branch October 25, 2022 00:02
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