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
2 changes: 1 addition & 1 deletion roottest/python/basic/PyROOT_datatypetest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

"""Data type conversion unit tests for PyROOT package."""

import os, sys, unittest

Check failure on line 9 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

roottest/python/basic/PyROOT_datatypetest.py:9:17: F401 `unittest` imported but unused

Check failure on line 9 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

roottest/python/basic/PyROOT_datatypetest.py:9:1: I001 Import block is un-sorted or un-formatted

Check failure on line 9 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E401)

roottest/python/basic/PyROOT_datatypetest.py:9:1: E401 Multiple imports on one line
sys.path.append(os.path.dirname( os.path.dirname(__file__)))

from common import *

Check failure on line 12 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F403)

roottest/python/basic/PyROOT_datatypetest.py:12:1: F403 `from common import *` used; unable to detect undefined names
from pytest import raises

# Compatibility notes: set_char() and set_uchar() raise a TypeError in PyROOT
Expand All @@ -22,7 +22,7 @@
is_64bit = sys.maxsize > 2**32

def setup_module(mod):
import sys, os

Check failure on line 25 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

roottest/python/basic/PyROOT_datatypetest.py:25:12: F401 `sys` imported but unused

Check failure on line 25 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

roottest/python/basic/PyROOT_datatypetest.py:25:5: I001 Import block is un-sorted or un-formatted

Check failure on line 25 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E401)

roottest/python/basic/PyROOT_datatypetest.py:25:5: E401 Multiple imports on one line
if not os.path.exists('DataTypes.C'):
os.chdir(os.path.dirname(__file__))
err = os.system("make DataTypes_C")
Expand Down Expand Up @@ -55,8 +55,8 @@
assert isinstance(c, CppyyTestData)

# reading boolean type
assert c.m_bool == False

Check failure on line 58 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E712)

roottest/python/basic/PyROOT_datatypetest.py:58:16: E712 Avoid equality comparisons to `False`; use `not c.m_bool:` for false checks
assert not c.get_bool(); assert not c.get_bool_cr(); assert not c.get_bool_r()

Check failure on line 59 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E702)

roottest/python/basic/PyROOT_datatypetest.py:59:60: E702 Multiple statements on one line (semicolon)

Check failure on line 59 in roottest/python/basic/PyROOT_datatypetest.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E702)

roottest/python/basic/PyROOT_datatypetest.py:59:32: E702 Multiple statements on one line (semicolon)

# reading char types
assert c.m_char == 'a'
Expand Down Expand Up @@ -558,7 +558,7 @@
setattr(gbl, 'g_'+name, adat)
assert getattr(gbl, 'g_'+name) == adat
assert getattr(gbl, 'g_c_'+name) == cdat
raises(TypeError, setattr, 'g_c_'+name, acdat)
raises(TypeError, setattr, gbl, 'g_c_'+name, acdat)
testcount += 1
assert testcount == len(testdata)

Expand Down
Loading