Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 8 additions & 17 deletions bindings/pyroot/pythonizations/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ ROOT_ADD_PYUNITTEST(pyroot_pyz_misc misc_pyz.py)

# RVec and subclasses pythonizations
ROOT_ADD_PYUNITTEST(pyroot_pyz_rvec rvec.py)
if(NOT MSVC OR win_broken_tests)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rvec_asrvec rvec_asrvec.py PYTHON_DEPS numpy)
endif()
ROOT_ADD_PYUNITTEST(pyroot_pyz_rvec_asrvec rvec_asrvec.py PYTHON_DEPS numpy)

# RDataFrame and subclasses pythonizations
if (dataframe)
Expand All @@ -117,14 +115,12 @@ if(roofit)
endif()

if (dataframe)
if(NOT MSVC OR win_broken_tests)
# Test wrapping Python callables for use in C++ using numba
ROOT_ADD_PYUNITTEST(pyroot_numbadeclare numbadeclare.py PYTHON_DEPS numba)
ROOT_ADD_PYUNITTEST(pyroot_rdf_filter_pyz rdf_filter_pyz.py PYTHON_DEPS numba)
ROOT_ADD_PYUNITTEST(pyroot_rdf_define_pyz rdf_define_pyz.py PYTHON_DEPS numba)
# std::string_view in CPyCppyy
ROOT_ADD_PYUNITTEST(pyroot_string_view string_view.py)
endif()
# Test wrapping Python callables for use in C++ using numba
ROOT_ADD_PYUNITTEST(pyroot_numbadeclare numbadeclare.py PYTHON_DEPS numba)
ROOT_ADD_PYUNITTEST(pyroot_rdf_filter_pyz rdf_filter_pyz.py PYTHON_DEPS numba)
ROOT_ADD_PYUNITTEST(pyroot_rdf_define_pyz rdf_define_pyz.py PYTHON_DEPS numba)
# std::string_view in CPyCppyy
ROOT_ADD_PYUNITTEST(pyroot_string_view string_view.py)
endif()

# Tests with memory usage
Expand All @@ -143,9 +139,4 @@ ROOT_ADD_PYUNITTEST(package_metadata package_metadata.py)

ROOT_ADD_PYUNITTEST(regression_23728 regression_23728.py)

if(NOT MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8 OR win_broken_tests)
# Test the conversion and low level views of interpreter-defined C++ arrays to NumPy
# We do not run this test on Windows x86 due to an interpreter issue with arrays:
# https://github.com/root-project/root/issues/9809
ROOT_ADD_PYUNITTEST(pyroot_array_numpy_views array_conversions.py PYTHON_DEPS numpy)
endif()
ROOT_ADD_PYUNITTEST(pyroot_array_numpy_views array_conversions.py PYTHON_DEPS numpy)
3 changes: 3 additions & 0 deletions bindings/pyroot/pythonizations/test/string_view.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import unittest
import ROOT
import cppyy

Check failure on line 4 in bindings/pyroot/pythonizations/test/string_view.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F401)

bindings/pyroot/pythonizations/test/string_view.py:4:8: F401 `cppyy` imported but unused help: Remove unused import: `cppyy`
import platform

Check failure on line 5 in bindings/pyroot/pythonizations/test/string_view.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F401)

bindings/pyroot/pythonizations/test/string_view.py:5:8: F401 `platform` imported but unused help: Remove unused import: `platform`

Check failure on line 5 in bindings/pyroot/pythonizations/test/string_view.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

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


class StringView(unittest.TestCase):
Expand All @@ -27,6 +27,9 @@

df = ROOT.RDataFrame(treename, filename)
self.assertEqual(df.GetNRuns(), 0)
# The RDataFrame keeps the file open; release it before removing the
# file, which otherwise fails on Windows.
del df
os.remove(filename)

if __name__ == '__main__':
Expand Down
5 changes: 0 additions & 5 deletions roottest/python/JupyROOT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#disable until JupyROOT works on Windows
if(NOT MSVC OR win_broken_tests)

# Do not run with classic build or if tests are vetoed
if (pyroot AND NOT ROOT_CLASSIC_BUILD)

Expand Down Expand Up @@ -62,5 +59,3 @@ ROOTTEST_ADD_TEST(${NOTEBOOKBASE}_notebook
PYTHON_DEPS jupyter)

endif()

endif()
2 changes: 0 additions & 2 deletions roottest/python/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ if(pyroot)
MACRO PyROOT_basictests.py
COPY_TO_BUILDDIR SimpleClass.C)

if(NOT MSVC OR win_broken_tests)
ROOTTEST_ADD_TEST(datatype-numpy
MACRO PyROOT_datatypetest_numpy.py
COPY_TO_BUILDDIR DataTypes.C DataTypes.h
PRECMD ${ROOT_root_CMD} -b -q -e .L\ DataTypes.C+
PYTHON_DEPS numpy)
endif()
endif()
2 changes: 0 additions & 2 deletions roottest/python/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if(pyroot)
if(NOT MSVC OR win_broken_tests)
ROOTTEST_ADD_TEST(cpp
MACRO PyROOT_cpptests.py
COPY_TO_BUILDDIR Namespace.C
Expand All @@ -10,4 +9,3 @@ if(NOT MSVC OR win_broken_tests)
COPY_TO_BUILDDIR AdvancedCpp.C
PRECMD ${ROOT_root_CMD} -b -q -e .L\ AdvancedCpp.C+)
endif()
endif()
7 changes: 2 additions & 5 deletions roottest/python/numba/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
if(pyroot)
if(NOT MSVC OR win_broken_tests)
ROOTTEST_ADD_TEST(numba
MACRO PyROOT_numbatests.py)
file(COPY vec_lv.root DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()
ROOTTEST_ADD_TEST(numba MACRO PyROOT_numbatests.py PYTHON_DEPS numba)
file(COPY vec_lv.root DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()
5 changes: 1 addition & 4 deletions roottest/python/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
if(pyroot)
if(NOT MSVC OR "${CMAKE_GENERATOR_PLATFORM}" MATCHES "Win32" OR win_broken_tests)
ROOTTEST_ADD_TEST(pythonizations
MACRO PyROOT_pythonizationtest.py)
endif()
ROOTTEST_ADD_TEST(pythonizations MACRO PyROOT_pythonizationtest.py)
endif()
Loading