From 2068d4d011bc230bed0b9789c888b77a2d3b7ddc Mon Sep 17 00:00:00 2001 From: davidvlaminck <“david.vlaminck@mow.vlaanderen.be”> Date: Mon, 25 Nov 2024 23:10:26 +0100 Subject: [PATCH] unit test for __eq__ check with Nones --- UnitTests/GeneralTests/OTLObject_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UnitTests/GeneralTests/OTLObject_test.py b/UnitTests/GeneralTests/OTLObject_test.py index e6df0a207..ca749ec4a 100644 --- a/UnitTests/GeneralTests/OTLObject_test.py +++ b/UnitTests/GeneralTests/OTLObject_test.py @@ -862,6 +862,14 @@ def test__eq__(subtests): assert not instance == instance2 + with subtests.test(msg='None'): + instance = AllCasesTestClass() + instance.testStringField = 'test' + + instance2 = None + + assert not instance == instance2 + def test_to_dict_and_from_dict(): instance = AllCasesTestClass()