Skip to content
Snippets Groups Projects
Commit 7e7d1ad6 authored by Simon Oehrl's avatar Simon Oehrl
Browse files

Expose nodes via attributes not functions

parent f4f1e960
Branches
Tags
No related merge requests found
Pipeline #165145 failed
......@@ -50,11 +50,11 @@ BOOST_PYTHON_MODULE(_pynesci_testing) {
class_<conduit::Node>("Node");
def("CreateNestMultimeterDataNode",
&nesci::testing::CreateNestMultimeterDataNode);
scope().attr("NestMultimeterDataNode") =
nesci::testing::CreateNestMultimeterDataNode();
def("CreateSpikeDetectorDataNode",
&nesci::testing::CreateSpikeDetectorDataNode);
scope().attr("SpikeDetectorDataNode") =
nesci::testing::CreateSpikeDetectorDataNode();
}
SUPPRESS_WARNINGS_END
......
......@@ -24,11 +24,9 @@ import pynesci.testing
def test_pynesci_consumer_device_data_view():
node = pynesci.testing.CreateSpikeDetectorDataNode()
device = pynesci.consumer.DeviceDataView(node)
device = pynesci.consumer.DeviceDataView(pynesci.testing.SpikeDetectorDataNode)
def test_pynesci_consumer_device_data_view_get_device_name():
node = pynesci.testing.CreateSpikeDetectorDataNode()
device = pynesci.consumer.DeviceDataView(node)
assert device.GetDeviceName() == "SomeDeviceName"
device = pynesci.consumer.DeviceDataView(pynesci.testing.SpikeDetectorDataNode)
assert device.GetDeviceName() == "AwesomeSpikeDetector"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment