Commit 0e17cb7
committed
[roottest] Remove python tests that are redundant with the cppyy tests
The tests under roottest/python and the upstream cppyy test suite
(bindings/pyroot/cppyy/cppyy/test/) both descend from the original PyROOT
test suite by Wim Lavrijsen, so a large fraction of roottest/python
duplicated coverage that already exists upstream (often verbatim, with
identical helper classes). This commit deletes the redundant tests so that
roottest/python only keeps ROOT-specific tests and the few cppyy-level
tests that have no (green) upstream equivalent yet.
Superseded tests, per file (upstream paths are relative to
bindings/pyroot/cppyy/cppyy/test/ unless noted as pythonizations/test/,
which is bindings/pyroot/pythonizations/test/):
basic/PyROOT_basictests.py:
- Basic3PythonLanguageTestCase.test1HaveDocString
-> test_fragile.py::test10_documentation,
test_doc_features.py::test_doc_strings
- Basic3PythonLanguageTestCase.test2BoundUnboundMethodCalls
-> test_pythonify.py::test14_bound_unbound_calls (near line-for-line)
- Basic3PythonLanguageTestCase.test3ThreadingSupport
-> test_concurrent.py (several tests set __release_gil__)
- Basic3PythonLanguageTestCase.test4ClassAndTypedefEquality
-> test_regression.py::test08_typedef_identity (same PyABC idiom)
- Basic4ArgumentPassingTestCase.test1-test8 (TString/TLorentzVector by
value/ref, interpreted and ACLiC-compiled, default arguments)
-> test_pythonify.py::test10_default_arguments,
test_advancedcpp.py::test01_default_arguments and
test07_pass_by_reference (the interpreted-vs-compiled axis is not a
distinct binding behavior in cppyy, which always JITs via cling)
- Basic4ArgumentPassingTestCase.test9ByRefPassing
-> test_lowlevel.py::test05_array_as_ref
- Basic6ReturnValueTestCase.test1ReturnIntegers
-> test_datatypes.py::test01_instance_data_read_access (get_*_r)
- helper files ArgumentPassingInterpreted.C, ArgumentPassingCompiled.C and
ReturnValues.C removed with their tests
basic/PyROOT_datatypetest_numpy.py:
- test02_boolarray2cpp (ROOT-10731)
-> test_lowlevel.py::test09_numpy_bool_array (same test)
- test03_arraydatamember_lifeline (#7501)
-> test_datatypes.py::test44_buffer_memory_handling
function/PyROOT_functiontests.py:
- Func3GlobalCppFunctionTestCase.test1-test5 (global, namespaced,
compiled global functions; namespace update from later dictionary)
-> test_pythonify.py::test08_global_functions,
test_advancedcpp.py::test03_namespaces and
test03a_namespace_lookup_on_update
- Func4GlobalCppFunctionAsMethodTestCase.test1/test2
-> test_pythonify.py::test15_installable_function
- helper files GlobalFunction.C, GlobalFunction2.C, GlobalFunction3.C,
InstallableFunction.C removed with their tests
cpp/PyROOT_advancedtests.py (AdvancedCpp.C maps 1:1 onto upstream
advancedcpp.h: PR_B->b_class, RefTester->ref_tester,
Convertible->some_convertible, Comparable->some_comparable, ...):
- Cpp01Inheritence.test1DataMembers -> test_advancedcpp.py::test06_datamembers
- Cpp01Inheritence.test2PassByReference
-> test_advancedcpp.py::test07_pass_by_reference
- Cpp02TemplateLookup.test01/test02 -> test_advancedcpp.py::test04_template_types
- Cpp02TemplateLookup.test03
-> test_advancedcpp.py::test15_template_instantiation_with_vector_of_float
- Cpp02TemplateLookup.test04-test07
-> test_templates.py::test01_template_member_functions
- Cpp02TemplateLookup.test08
-> test_advancedcpp.py::test16_template_global_functions,
test_templates.py::test03_templated_function
- Cpp02TemplateLookup.test09
-> test_templates.py::test33_using_template_argument,
test34_cstring_template_argument
- Cpp02TemplateLookup.test10 -> test_templates.py::test03_templated_function
- Cpp02TemplateLookup.test11 -> test_templates.py::test04_variadic_function
- Cpp03PassByNonConstRef.test2 -> test_lowlevel.py::test06_ctypes_as_ref_and_ptr
- Cpp03PassByNonConstRef.test3 -> test_datatypes.py/test_conversions.py
const-ref conversions
- Cpp04HandlingAbstractClasses.test1/test2
-> test_advancedcpp.py::test05_abstract_classes
- Cpp05AssignToRefArbitraryClass.test1AssignToReturnByRef
-> test_advancedcpp.py::test17_assign_to_return_byref
- Cpp06MathConverters.test1 -> test_advancedcpp.py::test18_math_converters
- Cpp07GloballyOverloadedComparator.test1
-> test_advancedcpp.py::test19_comparator
- Cpp07GloballyOverloadedComparator.test2
-> test_operators.py::test16_global_ordered_operators
- Cpp09LongExpressions.test1 -> test_advancedcpp.py::test10_object_identity
- Cpp10StandardExceptions.test1
-> test_stltypes.py (std::exception) and
test_regression.py::test49_overloads_with_runtime_errors
- Cpp11PointerContainers.test1
-> test_advancedcpp.py::test10_object_identity and test_stltypes.py
vector-of-pointers tests
- Cpp13OverloadedNewDelete.test1 -> test_advancedcpp.py::test14_new_overloader
- helper file Template.C removed with the template tests
Kept without upstream equivalent: Cpp05.test2NiceErrorMessageReturnByRef,
Cpp07.test3DirectUseComparator, Cpp10.test2ExceptionBoolValue,
Cpp12NamespaceLazyFunctions, Cpp14CopyConstructorOrdering. Cpp08
GlobalVariables is kept although covered by
test_advancedcpp.py::test21_access_to_global_variables because that
upstream test is currently marked xfail.
cpp/PyROOT_cpptests.py:
- test01ClassEnum, test02Globalenum, test03GlobalEnumType,
test05EnumSignedUnsigned
-> test_datatypes.py::test10_enum, test11_typed_enums;
test_regression.py::test24_C_style_enum
- test08ObjectValidity -> test_datatypes.py::test21_object_validity
- test11Namespaces
-> test_advancedcpp.py::test03_namespaces and
test03a_namespace_lookup_on_update
- test12VoidPointerPassing -> test_advancedcpp.py::test08_void_pointer_passing
- test15ObjectAndPointerComparisons
-> test_datatypes.py::test19_object_and_pointer_comparisons
- Cpp2ClassNamingTestCase.test01Underscore
-> test_pythonify.py::test13_underscore_in_class_name (identical z_)
- Cpp2ClassNamingTestCase.test02DefaultCtorInNamespace
-> test_advancedcpp.py::test01_default_arguments
- Cpp2ClassNamingTestCase.test04NamespacedTemplateIdentity
-> test_advancedcpp.py::test04_template_types
- Cpp4InheritanceTreeOverloadResolution.test1SingleArgumentFunction
(root-8817) -> test_overloads.py::test11_deep_inheritance
- helper files PointerPassing.C and Namespace2.C removed with their tests
Kept: test04NsEnumType and test06ScopedEnum (upstream
test_datatypes.py::test12_enum_scopes is currently xfail), the
ROOT-specific tests (TLorentzVector copy ctor with the PyROOT
MakeNullPointer/__assign__ API, TVectorF/TMatrixD element access, TROOT
statics, PyConfig.ExposeCppMacros, AsCObject/BindObject, AddressOf,
TGraphMultiErrors/TH1F using declarations), and the uncovered
Cpp2.test03NamespaceInTemplates and Cpp4.test2TwoArgumentFunctionAmbiguous.
pythonizations/PyROOT_pythonizationtest.py:
- TestClassPYTHONIZATIONS.test01_size_mapping
-> test_pythonization.py::test01_size_mapping (verbatim; the helper
MyBufferReturner is byte-identical to NakedBuffers in upstream
pythonizables.h)
- TestClassPYTHONIZATIONS.test02_type_pinning
-> test_pythonization.py::test03_type_pinning (verbatim, identical
MyBase/MyDerived/GimeDerived helpers)
- TestClassPYTHONIZATIONS_FRAGILITY: empty class with no tests, dropped
- TestClassROOT_PYTHONIZATIONS.test01_tgraph
-> pythonizations/test/tgraph_getters.py
- TestClassROOT_PYTHONIZATIONS.test03_th2 (ROOT-10109)
-> pythonizations/test/th2.py::test_GetBinError
- helper files Pythonizables.C/.h removed (upstream has identical copies)
Kept: test02_tfile (RooWorkspace/TFile read-back lifetime, not covered).
memory/PyROOT_memorytests.py:
- test3ObjectCallHeuristics
-> test_regression.py::test44_heuristic_mem_policy (same
CallRef/CallConstRef/CallPtr/CallConstPtr pattern and
SetHeuristicMemoryPolicy round-trip)
- test4DestructionOfDerivedClass
-> test_crossinheritance.py::test12a_counter_test and
test13_virtual_dtors_and_del
Kept: test1ObjectCreationDestruction (bound-method keep-alive nuance is
not covered upstream).
regression/PyROOT_regressiontests.py:
- Regression03OldCrashers.test6InspectionOfTH1I (ROOT-7336)
-> test_regression.py::test02_dir, test_fragile.py::test11_dir
- Regression05LoKiNamespace.test1/test2/test3 (ROOT-10256, ROOT-10292)
-> test_advancedcpp.py::test04_template_types and
test16_template_global_functions;
test_templates.py::test01_template_member_functions,
test03_templated_function, test07_type_deduction
- Regression06Int64Conversion.test1/test2
-> test_datatypes.py::test07_type_conversions (set_ulong/ullong)
- Regression07MatchConstWithProperReturn.test1
-> test_advancedcpp.py::test20_overload_order_with_proper_return
(identical overload_one_way/overload_the_other_way classes)
- Regression08CheckEnumExactMatch.test1
-> test_datatypes.py::test10_enum, test12_enum_scopes
- Regression11GlobalsLookup.test1GetCout -> test_streams.py::test02_std_cout
- Regression15ConsRef.test1 -> test_datatypes.py::test07_type_conversions
(set_*_cr const-ref conversions)
- Regression16NestedNamespace.test1
-> test_fragile.py::test12_imports (fragile::nested1::nested2::nested3)
and test30_two_nested_ambiguity
- Regression18FailingDowncast.test1
-> test_advancedcpp.py::test12_actual_type and
test13_actual_type_virtual_multi
- Regression21ReuseProxies.test1 (ROOT-8843)
-> test_advancedcpp.py::test10_object_identity (refers_to_self)
- Regression24CppPythonInheritance tests 01-07, 09, 10 (ROOT-10872,
ROOT-11010, ROOT-10789, #6376, #6467, #6345, #6470)
-> test_crossinheritance.py: test24_non_copyable (deleted copy ctor
and move ctor), test14_protected_access, test13_virtual_dtors_and_del,
test35_deletion, test02_constructor,
test19_cpp_side_multiple_inheritance,
test20_basic_multiple_inheritance,
test22_multiple_inheritance_with_defaults,
test30_access_and_overload, test17_deep_hierarchy, test28_cross_deep
- Cpp3TemplatedMathOperatorsTestCase.test01LorentzVector
-> test_templates.py::test19_templated_operator_add
- helper files Scott2.C, Till.C, ULongLong.C, LoKiNamespace.C and
NestedNamespace.h removed with their tests
Kept: the ROOT-specific tests (import-star, threading/GUI-thread rules,
TVector3/TMatrixD pythonizations, TFile/TGraph I/O, TGL, gEnv,
TMultiGraph cleanup, TFractionFitter, TGMainFrame ctor) and the tests
without upstream equivalent (PyException propagation, MuonTileID
temporary, namespaced iterator pythonization, no-loop operator*,
metaclass access, CoralAttributeList base iterators, direct PyException
construction, mixed Python+C++ multiple inheritance, operator[] vs
operator() shadowing #7179, using-decl operator(), smart-ptr overload
selection #15117).
The CMakeLists.txt files were updated to drop the removed helper macros
from COPY_TO_BUILDDIR/PRECMD. All remaining suites (basic,
datatype-numpy, function, cpp, advanced, pythonizations, memory,
regression) were run against the build tree and pass.
🤖 Done with the help of AI.1 parent 28b3942 commit 0e17cb7
30 files changed
Lines changed: 81 additions & 2182 deletions
File tree
- roottest/python
- basic
- cpp
- function
- memory
- pythonizations
- regression
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | 19 | | |
22 | | - | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
| |||
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | 103 | | |
260 | 104 | | |
261 | 105 | | |
| |||
419 | 263 | | |
420 | 264 | | |
421 | 265 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | 266 | | |
437 | 267 | | |
438 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
92 | 62 | | |
93 | 63 | | |
94 | 64 | | |
| |||
This file was deleted.
0 commit comments