Public Member Functions | Static Public Attributes | List of all members
test_pybind_wrapper.TestWrap Class Reference
Inheritance diagram for test_pybind_wrapper.TestWrap:
Inheritance graph
[legend]

Public Member Functions

def compare_and_diff (self, file, actual)
 
def test_class (self)
 
def test_enum (self)
 
def test_functions (self)
 
def test_geometry (self)
 
def test_inheritance (self)
 
def test_namespaces (self)
 
def test_operator_overload (self)
 
def test_special_cases (self)
 
def wrap_content (self, content, module_name, output_dir)
 

Static Public Attributes

 exist_ok
 
 INTERFACE_DIR = osp.join(TEST_DIR, 'fixtures')
 
 PYTHON_ACTUAL_DIR = osp.join(TEST_DIR, "actual", "python")
 
 PYTHON_TEST_DIR = osp.join(TEST_DIR, 'expected', 'python')
 
 TEST_DIR = osp.dirname(osp.realpath(__file__))
 

Detailed Description

Tests for Python wrapper based on Pybind11.

Definition at line 26 of file test_pybind_wrapper.py.

Member Function Documentation

def test_pybind_wrapper.TestWrap.compare_and_diff (   self,
  file,
  actual 
)
Compute the comparison between the expected and actual file,
and assert if diff is zero.

Definition at line 68 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_class (   self)
Test interface file with only class info.

Definition at line 104 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_enum (   self)
Test if enum generation is correct.

Definition at line 161 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_functions (   self)
Test interface file with function info.

Definition at line 94 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_geometry (   self)
Check generation of python geometry wrapper.
python3 ../pybind_wrapper.py --src geometry.h --module_name
    geometry_py --out output/geometry_py.cc

Definition at line 80 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_inheritance (   self)
Test interface file with class inheritance definitions.

Definition at line 113 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_namespaces (   self)
Check generation of python wrapper for full namespace definition.
python3 ../pybind_wrapper.py --src namespaces.i --module_name
    namespaces_py --out output/namespaces_py.cpp

Definition at line 123 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_operator_overload (   self)
Tests for operator overloading.

Definition at line 137 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.test_special_cases (   self)
Tests for some unique, non-trivial features.

Definition at line 149 of file test_pybind_wrapper.py.

def test_pybind_wrapper.TestWrap.wrap_content (   self,
  content,
  module_name,
  output_dir 
)
Common function to wrap content.

Definition at line 36 of file test_pybind_wrapper.py.

Member Data Documentation

test_pybind_wrapper.TestWrap.exist_ok
static

Definition at line 34 of file test_pybind_wrapper.py.

test_pybind_wrapper.TestWrap.INTERFACE_DIR = osp.join(TEST_DIR, 'fixtures')
static

Definition at line 29 of file test_pybind_wrapper.py.

test_pybind_wrapper.TestWrap.PYTHON_ACTUAL_DIR = osp.join(TEST_DIR, "actual", "python")
static

Definition at line 31 of file test_pybind_wrapper.py.

test_pybind_wrapper.TestWrap.PYTHON_TEST_DIR = osp.join(TEST_DIR, 'expected', 'python')
static

Definition at line 30 of file test_pybind_wrapper.py.

test_pybind_wrapper.TestWrap.TEST_DIR = osp.dirname(osp.realpath(__file__))
static

Definition at line 28 of file test_pybind_wrapper.py.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:59:21