FLAMEGPU2
FLAMEGPU2 copied to clipboard
[Test Failure] Swig RunPlan != can't compare with None?
Couple of Python test failures (debug/windows) whilst investigating the SWIG 4.2.1 issue, note this is with the Python wheel built with SWIG 4.2.1. Although, I've built it with 4.0.2 and received the same failures.
Not immediately clear their cause, these weren't touched in the recent bugfix so that's a coincidence.
====================================================== FAILURES =======================================================
____________________________________________ TestRunPlan.test_constructor _____________________________________________
self = <test_RunPlan.TestRunPlan testMethod=test_constructor>
def test_constructor(self):
# Create a model
model = pyflamegpu.ModelDescription("test")
plan = None
plan = pyflamegpu.RunPlan(model)
> assert plan != None
simulation\test_RunPlan.py:13:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pyflamegpu.pyflamegpu.RunPlan; proxy of <Swig Object of type 'flamegpu::RunPlan *' at 0x0000022AD963CB40> >
rhs = None
def __ne__(self, rhs):
> return _pyflamegpu.RunPlan___ne__(self, rhs)
E ValueError: invalid null reference in method 'RunPlan___ne__', argument 2 of type 'flamegpu::RunPlan const &'
..\..\build\lib\Debug\python\venv\Lib\site-packages\pyflamegpu\pyflamegpu.py:16808: ValueError
_________________________________________ TestRunPlanVector.test_constructor __________________________________________
self = <test_RunPlanVector.TestRunPlanVector testMethod=test_constructor>
def test_constructor(self):
# Create a model
model = pyflamegpu.ModelDescription("test")
# Declare a pointer
plans = None
# Use New
initialLength = 4
plans = pyflamegpu.RunPlanVector(model, initialLength)
> assert plans != None
simulation\test_RunPlanVector.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pyflamegpu.pyflamegpu.RunPlanVector; proxy of <Swig Object of type 'flamegpu::RunPlanVector *' at 0x0000022AD95E5BC0> >
rhs = None
def __ne__(self, rhs):
> return _pyflamegpu.RunPlanVector___ne__(self, rhs)
E ValueError: invalid null reference in method 'RunPlanVector___ne__', argument 2 of type 'flamegpu::RunPlanVector const &'
..\..\build\lib\Debug\python\venv\Lib\site-packages\pyflamegpu\pyflamegpu.py:18426: ValueError
=============================================== short test summary info ===============================================
FAILED simulation/test_RunPlan.py::TestRunPlan::test_constructor - ValueError: invalid null reference in method 'RunPlan___ne__', argument 2 of type 'flamegpu::RunPlan const &'
FAILED simulation/test_RunPlanVector.py::TestRunPlanVector::test_constructor - ValueError: invalid null reference in method 'RunPlanVector___ne__', argument 2 of type 'flamegpu::RunPlanVector co...
================================ 2 failed, 674 passed, 12 skipped in 727.95s (0:12:07) ================================