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

test: ignore existing NCBI_API_KEY env var #70

Merged
merged 4 commits into from
Sep 11, 2024
Merged
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
10 changes: 10 additions & 0 deletions tests/test_seqfetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
)


@pytest.fixture(autouse=True)
def clear_env():
"""Some tests in this module assume that the default utils access configs are
active. If you execute tests in an environment with an existing `NCBI_API_KEY` env
var, those tests will fail unless we first remove that variable.
"""
if "NCBI_API_KEY" in os.environ:
del os.environ["NCBI_API_KEY"]


@vcr.use_cassette
def test_fetch_seq():
assert 1596 == len(fetch_seq("NP_056374.2"))
Expand Down