Unverified Commit 1cd95e65 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

skip tests that use assert_run_python_script on windows (#7351)

parent 547dd1d0
...@@ -2,6 +2,7 @@ import math ...@@ -2,6 +2,7 @@ import math
import os import os
import random import random
import re import re
import sys
import textwrap import textwrap
import warnings import warnings
from functools import partial from functools import partial
...@@ -2278,6 +2279,10 @@ def test_random_grayscale_with_grayscale_input(): ...@@ -2278,6 +2279,10 @@ def test_random_grayscale_with_grayscale_input():
), ),
) )
@pytest.mark.parametrize("from_private", (True, False)) @pytest.mark.parametrize("from_private", (True, False))
@pytest.mark.skipif(
sys.platform in ("win32", "cygwin"),
reason="assert_run_python_script is broken on Windows. Possible fix in https://github.com/pytorch/vision/pull/7346",
)
def test_functional_deprecation_warning(import_statement, from_private): def test_functional_deprecation_warning(import_statement, from_private):
if from_private: if from_private:
import_statement = import_statement.replace("functional", "_functional") import_statement = import_statement.replace("functional", "_functional")
......
...@@ -2,6 +2,7 @@ import itertools ...@@ -2,6 +2,7 @@ import itertools
import pathlib import pathlib
import random import random
import re import re
import sys
import textwrap import textwrap
import warnings import warnings
from collections import defaultdict from collections import defaultdict
...@@ -2101,6 +2102,10 @@ def test_sanitize_bounding_boxes_errors(): ...@@ -2101,6 +2102,10 @@ def test_sanitize_bounding_boxes_errors():
), ),
) )
@pytest.mark.parametrize("call_disable_warning", (True, False)) @pytest.mark.parametrize("call_disable_warning", (True, False))
@pytest.mark.skipif(
sys.platform in ("win32", "cygwin"),
reason="assert_run_python_script is broken on Windows. Possible fix in https://github.com/pytorch/vision/pull/7346",
)
def test_warnings_v2_namespaces(import_statement, call_disable_warning): def test_warnings_v2_namespaces(import_statement, call_disable_warning):
if call_disable_warning: if call_disable_warning:
source = f""" source = f"""
...@@ -2120,6 +2125,10 @@ def test_warnings_v2_namespaces(import_statement, call_disable_warning): ...@@ -2120,6 +2125,10 @@ def test_warnings_v2_namespaces(import_statement, call_disable_warning):
assert_run_python_script(textwrap.dedent(source)) assert_run_python_script(textwrap.dedent(source))
@pytest.mark.skipif(
sys.platform in ("win32", "cygwin"),
reason="assert_run_python_script is broken on Windows. Possible fix in https://github.com/pytorch/vision/pull/7346",
)
def test_no_warnings_v1_namespace(): def test_no_warnings_v1_namespace():
source = """ source = """
import warnings import warnings
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment