Skip to content

Commit

Permalink
[test] Update tags
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Sep 20, 2024
1 parent 65b39ed commit ace71c9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
5 changes: 5 additions & 0 deletions test/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def setup_make(targetname):
os.environ["CPPYY_UNCAUGHT_QUIET"] = "1"
else:
IS_MAC_X86 = 1
IS_MAC = IS_MAC_ARM or IS_MAC_X86

IS_LINUX = 0
if 'linux' in sys.platform:
IS_LINUX = 1

try:
import __pypy__
Expand Down
9 changes: 4 additions & 5 deletions test/test_datatypes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC

IS_MAC = IS_MAC_X86 or IS_MAC_ARM

Expand Down Expand Up @@ -378,7 +378,7 @@ def test03_array_passing(self):

c.__destruct__()

@mark.xfail
@mark.xfail(condition= not(IS_CLANG_REPL), reason="Fails on with Cling")
def test04_class_read_access(self):
"""Test read access to class public data and verify values"""

Expand Down Expand Up @@ -442,7 +442,7 @@ def test04_class_read_access(self):

c.__destruct__()

@mark.xfail
@mark.xfail(condition = not(IS_CLANG_REPL), reason="Fails on Cling")
def test05_class_data_write_access(self):
"""Test write access to class public data and verify values"""

Expand Down Expand Up @@ -578,7 +578,7 @@ def test07_type_conversions(self):

c.__destruct__()

@mark.xfail
@mark.xfail(condition= IS_MAC, reason="Fails on OS X")
def test08_global_builtin_type(self):
"""Test access to a global builtin type"""

Expand Down Expand Up @@ -1967,7 +1967,6 @@ def test38_plain_old_data(self):
assert len(f1.fPtrArr) == 3
assert list(f1.fPtrArr) == [1., 2., 3]

@mark.xfail(run=not IS_CLANG_REPL, reason="Crashes")
def test39_aggregates(self):
"""Initializer construction of aggregates"""

Expand Down
4 changes: 2 additions & 2 deletions test/test_fragile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_ARM, IS_CLANG_REPL
from .support import setup_make, ispypy, IS_LINUX, IS_WINDOWS, IS_MAC_ARM, IS_CLANG_REPL


currpath = py.path.local(__file__).dirpath()
Expand Down Expand Up @@ -562,7 +562,7 @@ def test23_set_debug(self):
cppyy.set_debug(False)
assert cppyy.gbl.Cpp.IsDebugOutputEnabled() == False

@mark.xfail
@mark.xfail(condition = IS_LINUX, reason="Fails on Ubuntu")
def test24_asan(self):
"""Check availability of ASAN with gcc"""

Expand Down
3 changes: 1 addition & 2 deletions test/test_regression.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM, IS_MAC


class TestREGRESSION:
Expand Down Expand Up @@ -587,7 +587,6 @@ class Bar {
r21.Bar([1,2]) # used to call Bar(Foo x) through implicit conversion
assert r21.what_called == 'Bar(il<size=2>)'

@mark.xfail
def test23_copy_constructor(self):
"""Copy construct an object into an empty (NULL) proxy"""

Expand Down
4 changes: 2 additions & 2 deletions test/test_stltypes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: UTF-8 -*-
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, pylong, pyunicode, maxvalue, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
from .support import setup_make, pylong, pyunicode, maxvalue, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM, IS_MAC, IS_LINUX

currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("stltypesDict"))
Expand Down Expand Up @@ -1950,7 +1950,7 @@ def test01_basics(self):
assert YourError.__cpp_name__ == 'ErrorNamespace::YourError'
assert YourError.__module__ == 'cppyy.gbl.ErrorNamespace'

@mark.xfail
@mark.xfail(condition = IS_MAC or (IS_LINUX and IS_CLANG_REPL), reason="Fails on OS X")
def test02_raising(self):
"""Raise a C++ std::exception derived class as a Python excption"""

Expand Down

0 comments on commit ace71c9

Please sign in to comment.