Skip to content

Commit

Permalink
Mark tests as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dunnkers committed Jul 28, 2022
1 parent 9fa2c69 commit 5e9355a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tests/unit/callbacks/test_to_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ def test_on_summary(wandb_callback: WandbCallback):
# → assertions in `test_on_end`


@pytest.mark.xfail(
"The Weights-and-Biases platform has proven to have too large delays to be able to"
+ " run integration tests on it consistently. Alhough the WandB platform does"
+ " eventually upload all the data that is being sent to it, all logging is queued,"
+ " making it hard to rely on it in integration-/ unit test settings."
+ "Therefore this test is marked as optional to prevent unnecessary build failures."
+ " The test is kept in the codebase, however, for convenience in local debugging."
)
@pytest.mark.dependency(
depends=[
"test_on_begin",
Expand All @@ -130,7 +138,6 @@ def test_on_end(wandb_callback: WandbCallback, api: Api, request: FixtureRequest

# `on_end`
wandb_callback.on_end()
sleep(5) # wait to give wandb run time to end

# ensure finished
api._runs = {} # reset wandb runs internal cache
Expand Down
9 changes: 8 additions & 1 deletion tests/unit/storage/test_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ def test_save(request: FixtureRequest):
cache.set("filename", filename)


@pytest.mark.xfail(reason="Weights and Biases might not have saved the file correctly.")
@pytest.mark.xfail(
"The Weights-and-Biases platform has proven to have too large delays to be able to"
+ " run integration tests on it consistently. Alhough the WandB platform does"
+ " eventually upload all the data that is being sent to it, all logging is queued,"
+ " making it hard to rely on it in integration-/ unit test settings."
+ "Therefore this test is marked as optional to prevent unnecessary build failures."
+ " The test is kept in the codebase, however, for convenience in local debugging."
)
@pytest.mark.dependency(depends=["test_save"])
def test_load(request: FixtureRequest):
# retrieve previous run id from cache
Expand Down

0 comments on commit 5e9355a

Please sign in to comment.