Skip to content

Commit ace71c9

Browse files
committed
[test] Update tags
1 parent 65b39ed commit ace71c9

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

test/support.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ def setup_make(targetname):
4242
os.environ["CPPYY_UNCAUGHT_QUIET"] = "1"
4343
else:
4444
IS_MAC_X86 = 1
45+
IS_MAC = IS_MAC_ARM or IS_MAC_X86
46+
47+
IS_LINUX = 0
48+
if 'linux' in sys.platform:
49+
IS_LINUX = 1
4550

4651
try:
4752
import __pypy__

test/test_datatypes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM
3+
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC
44

55
IS_MAC = IS_MAC_X86 or IS_MAC_ARM
66

@@ -378,7 +378,7 @@ def test03_array_passing(self):
378378

379379
c.__destruct__()
380380

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

@@ -442,7 +442,7 @@ def test04_class_read_access(self):
442442

443443
c.__destruct__()
444444

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

@@ -578,7 +578,7 @@ def test07_type_conversions(self):
578578

579579
c.__destruct__()
580580

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

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

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

test/test_fragile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, ispypy, IS_WINDOWS, IS_MAC_ARM, IS_CLANG_REPL
3+
from .support import setup_make, ispypy, IS_LINUX, IS_WINDOWS, IS_MAC_ARM, IS_CLANG_REPL
44

55

66
currpath = py.path.local(__file__).dirpath()
@@ -562,7 +562,7 @@ def test23_set_debug(self):
562562
cppyy.set_debug(False)
563563
assert cppyy.gbl.Cpp.IsDebugOutputEnabled() == False
564564

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

test/test_regression.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
3+
from .support import setup_make, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM, IS_MAC
44

55

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

590-
@mark.xfail
591590
def test23_copy_constructor(self):
592591
"""Copy construct an object into an empty (NULL) proxy"""
593592

test/test_stltypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: UTF-8 -*-
22
import py, os, sys
33
from pytest import raises, skip, mark
4-
from .support import setup_make, pylong, pyunicode, maxvalue, ispypy, IS_CLANG_REPL, IS_CLANG_DEBUG, IS_MAC_X86, IS_MAC_ARM
4+
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
55

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

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

0 commit comments

Comments
 (0)