μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions | Variables
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_bad_arg_default (msg)
 
def test_accepts_none (msg)
 
def test_casts_none ()
 
def test_str_issue (msg)
 
def test_unregistered_base_implementations ()
 
def test_ref_qualified ()
 
def test_overload_ordering ()
 
def test_rvalue_ref_param ()
 

Variables

tuple NO_GETTER_MSG
 
tuple NO_SETTER_MSG
 
tuple NO_DELETER_MSG
 

Function Documentation

◆ test_accepts_none()

def test_methods_and_attributes.test_accepts_none (   msg)

Definition at line 371 of file test_methods_and_attributes.py.

◆ test_bad_arg_default()

def test_methods_and_attributes.test_bad_arg_default (   msg)

Definition at line 347 of file test_methods_and_attributes.py.

◆ test_casts_none()

def test_methods_and_attributes.test_casts_none ( )
#2778: implicit casting from None to object (not pointer)

Definition at line 433 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 70 of file test_methods_and_attributes.py.

◆ test_cyclic_gc()

def test_methods_and_attributes.test_cyclic_gc ( )

Definition at line 326 of file test_methods_and_attributes.py.

References ConstructorStats.get().

◆ test_dynamic_attributes()

def test_methods_and_attributes.test_dynamic_attributes ( )

Definition at line 284 of file test_methods_and_attributes.py.

References ConstructorStats.get(), and hasattr().

◆ 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 201 of file test_methods_and_attributes.py.

References isinstance().

◆ test_methods_and_attributes()

def test_methods_and_attributes.test_methods_and_attributes ( )

Definition at line 9 of file test_methods_and_attributes.py.

References ConstructorStats.get().

◆ test_no_mixed_overloads()

def test_methods_and_attributes.test_no_mixed_overloads ( )

Definition at line 219 of file test_methods_and_attributes.py.

◆ test_overload_ordering()

def test_methods_and_attributes.test_overload_ordering ( )

Definition at line 492 of file test_methods_and_attributes.py.

◆ test_properties()

def test_methods_and_attributes.test_properties ( )

Definition at line 87 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 247 of file test_methods_and_attributes.py.

References getattr().

◆ 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 270 of file test_methods_and_attributes.py.

◆ test_ref_qualified()

def test_methods_and_attributes.test_ref_qualified ( )
Tests that explicit lvalue ref-qualified methods can be called just like their
non ref-qualified counterparts.

Definition at line 481 of file test_methods_and_attributes.py.

◆ test_rvalue_ref_param()

def test_methods_and_attributes.test_rvalue_ref_param ( )

Definition at line 520 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 187 of file test_methods_and_attributes.py.

◆ test_static_properties()

def test_methods_and_attributes.test_static_properties ( )

Definition at line 120 of file test_methods_and_attributes.py.

References hasattr().

◆ 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 444 of file test_methods_and_attributes.py.

◆ test_unregistered_base_implementations()

def test_methods_and_attributes.test_unregistered_base_implementations ( )

Definition at line 463 of file test_methods_and_attributes.py.

Variable Documentation

◆ NO_DELETER_MSG

tuple test_methods_and_attributes.NO_DELETER_MSG
Initial value:
1= (
2 "can't delete attribute" if sys.version_info < (3, 11) else "object has no deleter"
3)

Definition at line 15 of file test_methods_and_attributes.py.

◆ NO_GETTER_MSG

tuple test_methods_and_attributes.NO_GETTER_MSG
Initial value:
1= (
2 "unreadable attribute" if sys.version_info < (3, 11) else "object has no getter"
3)

Definition at line 9 of file test_methods_and_attributes.py.

◆ NO_SETTER_MSG

tuple test_methods_and_attributes.NO_SETTER_MSG
Initial value:
1= (
2 "can't set attribute" if sys.version_info < (3, 11) else "object has no setter"
3)

Definition at line 12 of file test_methods_and_attributes.py.