Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions bindings/pyroot/cppyy/cppyy/test/test_datatypes.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import sys, pytest, os

Check failure on line 1 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F401)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:1:21: F401 `os` imported but unused help: Remove unused import: `os`

Check failure on line 1 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E401)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:1:1: E401 Multiple imports on one line help: Split imports
from pytest import mark, raises, skip
from support import setup_make, pylong, pyunicode, IS_MAC, IS_MAC_ARM, IS_WINDOWS, has_cpp_20
from support import setup_make, pylong, pyunicode, IS_MAC, IS_MAC_ARM, IS_WINDOWS

Check failure on line 3 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F401)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:3:21: F401 `support.setup_make` imported but unused help: Remove unused import: `support.setup_make`

Check failure on line 3 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:1:1: I001 Import block is un-sorted or un-formatted help: Organize imports

test_dct = "datatypes_cxx"


def is_modules_off():
import cppyy

return "runtime_cxxmodules" not in cppyy.gbl.gROOT.GetConfigFeatures()


class TestDATATYPES:
def setup_class(cls):
import cppyy
Expand All @@ -30,18 +24,18 @@
assert isinstance(c, CppyyTestData)

# reading boolean type
assert c.m_bool == False

Check failure on line 27 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E712)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:27:16: E712 Avoid equality comparisons to `False`; use `not c.m_bool:` for false checks help: Replace with `not c.m_bool`
assert not c.get_bool(); assert not c.get_bool_cr(); assert not c.get_bool_r()

Check failure on line 28 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E702)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:28:60: E702 Multiple statements on one line (semicolon)

Check failure on line 28 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E702)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:28:32: E702 Multiple statements on one line (semicolon)

# reading char types
assert c.m_char == 'a'
assert c.m_schar == 'b'
assert c.m_uchar == 'c'
assert type(c.m_wchar) == pyunicode

Check failure on line 34 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E721)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:34:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
assert c.m_wchar == u'D'
assert type(c.m_char16) == pyunicode

Check failure on line 36 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E721)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:36:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
assert c.m_char16 == u'\u00df'
assert type(c.m_char32) == pyunicode

Check failure on line 38 in bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E721)

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:38:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
assert c.m_char32 == u'\u00df'

# reading integer types
Expand Down Expand Up @@ -2345,8 +2339,7 @@
assert str(bt(1)) == 'True'
assert str(bt(0)) == 'False'

@mark.xfail(strict=True, run=not IS_WINDOWS, condition=IS_MAC_ARM or (not has_cpp_20() and is_modules_off()), reason="Crashes on mac-beta ARM64 and fails on Windows \
assertion error for runtime_cxxmodules=OFF build that is explained in GitHub issue #21005")
@mark.xfail(strict=True, run=not IS_WINDOWS, condition=IS_MAC_ARM, reason="Crashes on mac-beta ARM64 and fails on Windows")
def test49_addressof_method(self):
"""Use of addressof for (const) methods"""

Expand Down
Loading