Scarab  v2.9.1
Project 8 C++ Utility Library
Functions
test_factory_constructors Namespace Reference

Functions

def test_init_factory_basic ()
 
def test_init_factory_signature (msg)
 
def test_init_factory_casting ()
 
def test_init_factory_alias ()
 
def test_init_factory_dual ()
 
def test_no_placement_new (capture)
 
def test_multiple_inheritance ()
 
def create_and_destroy (args)
 
def strip_comments (s)
 
def test_reallocations (capture, msg)
 
def test_invalid_self ()
 

Function Documentation

◆ create_and_destroy()

def test_factory_constructors.create_and_destroy (   args)

Definition at line 322 of file test_factory_constructors.py.

◆ strip_comments()

def test_factory_constructors.strip_comments (   s)

Definition at line 329 of file test_factory_constructors.py.

◆ test_init_factory_alias()

def test_factory_constructors.test_init_factory_alias ( )
Tests py::init_factory() wrapper with value conversions and alias types

Definition at line 135 of file test_factory_constructors.py.

◆ test_init_factory_basic()

def test_factory_constructors.test_init_factory_basic ( )
Tests py::init_factory() wrapper around various ways of returning the object

Definition at line 9 of file test_factory_constructors.py.

◆ test_init_factory_casting()

def test_factory_constructors.test_init_factory_casting ( )
Tests py::init_factory() wrapper with various upcasting and downcasting returns

Definition at line 90 of file test_factory_constructors.py.

◆ test_init_factory_dual()

def test_factory_constructors.test_init_factory_dual ( )
Tests init factory functions with dual main/alias factory functions

Definition at line 205 of file test_factory_constructors.py.

◆ test_init_factory_signature()

def test_factory_constructors.test_init_factory_signature (   msg)

Definition at line 63 of file test_factory_constructors.py.

◆ test_invalid_self()

def test_factory_constructors.test_invalid_self ( )
Tests invocation of the pybind-registered base class with an invalid `self` argument.  You
can only actually do this on Python 3: Python 2 raises an exception itself if you try.

Definition at line 421 of file test_factory_constructors.py.

◆ test_multiple_inheritance()

def test_factory_constructors.test_multiple_inheritance ( )

Definition at line 311 of file test_factory_constructors.py.

◆ test_no_placement_new()

def test_factory_constructors.test_no_placement_new (   capture)
Prior to 2.2, `py::init<...>` relied on the type supporting placement
new; this tests a class without placement new support.

Definition at line 285 of file test_factory_constructors.py.

◆ test_reallocations()

def test_factory_constructors.test_reallocations (   capture,
  msg 
)
When the constructor is overloaded, previous overloads can require a preallocated value.
This test makes sure that such preallocated values only happen when they might be necessary,
and that they are deallocated properly

Definition at line 333 of file test_factory_constructors.py.