Scarab  2.8.1
Project 8 C++ Utility Library
Functions
test_methods_and_attributes Namespace Reference

Functions

def test_methods_and_attributes ()
 
def test_copy_method ()
 
def test_properties ()
 
def test_static_properties ()
 
def test_static_cls ()
 
def test_metaclass_override ()
 
def test_no_mixed_overloads ()
 
def test_property_return_value_policies (access)
 
def test_property_rvalue_policy ()
 
def test_dynamic_attributes ()
 
def test_cyclic_gc ()
 
def test_noconvert_args (msg)
 
def test_bad_arg_default (msg)
 
def test_accepts_none (msg)
 
def test_str_issue (msg)
 
def test_unregistered_base_implementations ()
 
def test_custom_caster_destruction ()
 

Function Documentation

◆ test_accepts_none()

def test_methods_and_attributes.test_accepts_none (   msg)

Definition at line 411 of file test_methods_and_attributes.py.

◆ test_bad_arg_default()

def test_methods_and_attributes.test_bad_arg_default (   msg)

Definition at line 387 of file test_methods_and_attributes.py.

◆ test_copy_method()

def test_methods_and_attributes.test_copy_method ( )
Issue #443: calling copied methods fails in Python 3

Definition at line 67 of file test_methods_and_attributes.py.

◆ test_custom_caster_destruction()

def test_methods_and_attributes.test_custom_caster_destruction ( )
Tests that returning a pointer to a type that gets converted with a custom type caster gets
destroyed when the function has py::return_value_policy::take_ownership policy applied.

Definition at line 491 of file test_methods_and_attributes.py.

◆ test_cyclic_gc()

def test_methods_and_attributes.test_cyclic_gc ( )

Definition at line 303 of file test_methods_and_attributes.py.

◆ test_dynamic_attributes()

def test_methods_and_attributes.test_dynamic_attributes ( )

Definition at line 261 of file test_methods_and_attributes.py.

◆ test_metaclass_override()

def test_methods_and_attributes.test_metaclass_override ( )
Overriding pybind11's default metaclass changes the behavior of `static_property`

Definition at line 185 of file test_methods_and_attributes.py.

◆ test_methods_and_attributes()

def test_methods_and_attributes.test_methods_and_attributes ( )

Definition at line 6 of file test_methods_and_attributes.py.

◆ test_no_mixed_overloads()

def test_methods_and_attributes.test_no_mixed_overloads ( )

Definition at line 200 of file test_methods_and_attributes.py.

◆ test_noconvert_args()

def test_methods_and_attributes.test_noconvert_args (   msg)

Definition at line 324 of file test_methods_and_attributes.py.

◆ test_properties()

def test_methods_and_attributes.test_properties ( )

Definition at line 84 of file test_methods_and_attributes.py.

◆ test_property_return_value_policies()

def test_methods_and_attributes.test_property_return_value_policies (   access)

Definition at line 224 of file test_methods_and_attributes.py.

◆ test_property_rvalue_policy()

def test_methods_and_attributes.test_property_rvalue_policy ( )
When returning an rvalue, the return value policy is automatically changed from
`reference(_internal)` to `move`. The following would not work otherwise.

Definition at line 247 of file test_methods_and_attributes.py.

◆ test_static_cls()

def test_methods_and_attributes.test_static_cls ( )
Static property getter and setters expect the type object as the their only argument

Definition at line 171 of file test_methods_and_attributes.py.

◆ test_static_properties()

def test_methods_and_attributes.test_static_properties ( )

Definition at line 117 of file test_methods_and_attributes.py.

◆ test_str_issue()

def test_methods_and_attributes.test_str_issue (   msg)
#283: __str__ called on uninitialized instance when constructor arguments invalid

Definition at line 457 of file test_methods_and_attributes.py.

◆ test_unregistered_base_implementations()

def test_methods_and_attributes.test_unregistered_base_implementations ( )

Definition at line 473 of file test_methods_and_attributes.py.