Skip to content

Commit

Permalink
Tests: Workaround for Swig 4.2.1 != None erorrs
Browse files Browse the repository at this point in the history
Works around the swig 4.2.1 x != None errors in the pyflamegpu test suite by using the more idiomatic is not None.

The underlying issue within Swig is resolved in 4.3.0.
  • Loading branch information
ptheywood committed Oct 28, 2024
1 parent f3f6b0d commit 41fe3b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/python/simulation/test_RunPlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_constructor(self):
model = pyflamegpu.ModelDescription("test")
plan = None
plan = pyflamegpu.RunPlan(model)
assert plan != None
assert plan is not None
plan = None

def test_setRandomSimulationSeed(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/python/simulation/test_RunPlanVector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_constructor(self):
# Use New
initialLength = 4
plans = pyflamegpu.RunPlanVector(model, initialLength)
assert plans != None
assert plans is not None
assert plans.size() == initialLength
# Run the destructor
plans = None
Expand Down
2 changes: 1 addition & 1 deletion tests/python/simulation/test_cuda_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_constructor(self):
# Use the ctor
# explicit CUDAEnsemble(const ModelDescription& model, int argc = 0, const char** argv = None)
ensemble = pyflamegpu.CUDAEnsemble(model, [])
assert ensemble != None
assert ensemble is not None
# Check a property
assert ensemble.Config().timing == False
# Run the destructor ~CUDAEnsemble
Expand Down

0 comments on commit 41fe3b0

Please sign in to comment.