Skip to content

Commit d2ab93e

Browse files
authored
Skip failing tests due to dependencies (#19621)
1 parent 096b063 commit d2ab93e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/tests_pytorch/models/test_hparams.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import functools
1616
import os
1717
import pickle
18+
import sys
1819
from argparse import Namespace
1920
from dataclasses import dataclass
2021
from enum import Enum
@@ -43,6 +44,8 @@
4344
from omegaconf import Container, OmegaConf
4445
from omegaconf.dictconfig import DictConfig
4546

47+
_PYTHON_GREATER_EQUAL_3_9_0 = (sys.version_info.major, sys.version_info.minor) >= (3, 9)
48+
4649

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

699702

703+
@pytest.mark.xfail(
704+
# AttributeError: 'OrphanPath' object has no attribute 'exists'
705+
# Issue with `importlib_resources>=6.2.0`
706+
raises=AttributeError,
707+
condition=(not _PYTHON_GREATER_EQUAL_3_9_0),
708+
reason="Issue with `importlib_resources`",
709+
strict=False,
710+
)
700711
@pytest.mark.skipif(RequirementCache("hydra-core<1.1"), reason="Requires Hydra's Compose API")
701712
def test_model_save_hyper_parameters_interpolation_with_hydra(tmpdir):
702713
"""This test relies on configuration saved under tests/models/conf/config.yaml."""

tests/tests_pytorch/test_cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,13 @@ def test_comet_logger_init_args():
15341534
)
15351535

15361536

1537+
@pytest.mark.xfail(
1538+
# Only on Windows: TypeError: 'NoneType' object is not subscriptable
1539+
raises=TypeError,
1540+
condition=(sys.platform == "win32"),
1541+
strict=False,
1542+
reason="TypeError on Windows when parsing",
1543+
)
15371544
def test_neptune_logger_init_args():
15381545
_test_logger_init_args(
15391546
"NeptuneLogger",

0 commit comments

Comments
 (0)