Skip to content

Commit

Permalink
Skip failing tests due to dependencies (#19621)
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Mar 13, 2024
1 parent 096b063 commit d2ab93e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tests_pytorch/models/test_hparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import functools
import os
import pickle
import sys
from argparse import Namespace
from dataclasses import dataclass
from enum import Enum
Expand Down Expand Up @@ -43,6 +44,8 @@
from omegaconf import Container, OmegaConf
from omegaconf.dictconfig import DictConfig

_PYTHON_GREATER_EQUAL_3_9_0 = (sys.version_info.major, sys.version_info.minor) >= (3, 9)


class SaveHparamsModel(BoringModel):
"""Tests that a model can take an object."""
Expand Down Expand Up @@ -697,6 +700,14 @@ def test_model_with_fsspec_as_parameter(tmpdir):
trainer.test()


@pytest.mark.xfail(
# AttributeError: 'OrphanPath' object has no attribute 'exists'
# Issue with `importlib_resources>=6.2.0`
raises=AttributeError,
condition=(not _PYTHON_GREATER_EQUAL_3_9_0),
reason="Issue with `importlib_resources`",
strict=False,
)
@pytest.mark.skipif(RequirementCache("hydra-core<1.1"), reason="Requires Hydra's Compose API")
def test_model_save_hyper_parameters_interpolation_with_hydra(tmpdir):
"""This test relies on configuration saved under tests/models/conf/config.yaml."""
Expand Down
7 changes: 7 additions & 0 deletions tests/tests_pytorch/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,13 @@ def test_comet_logger_init_args():
)


@pytest.mark.xfail(
# Only on Windows: TypeError: 'NoneType' object is not subscriptable
raises=TypeError,
condition=(sys.platform == "win32"),
strict=False,
reason="TypeError on Windows when parsing",
)
def test_neptune_logger_init_args():
_test_logger_init_args(
"NeptuneLogger",
Expand Down

0 comments on commit d2ab93e

Please sign in to comment.