@@ -22,7 +22,7 @@ def collision_groups_tester(cd):
22
22
group = cd .createCollisionGroup ()
23
23
group .addShapeFrame (simple_frame1 )
24
24
group .addShapeFrame (simple_frame2 )
25
- assert group .getNumShapeFrames () is 2
25
+ assert group .getNumShapeFrames () == 2
26
26
27
27
#
28
28
# ( s1,s2 ) collision!
@@ -44,19 +44,19 @@ def collision_groups_tester(cd):
44
44
45
45
group .collide (option , result )
46
46
assert not result .isCollision ()
47
- assert result .getNumContacts () is 0
47
+ assert result .getNumContacts () == 0
48
48
49
49
option .enableContact = True
50
50
simple_frame2 .setTranslation ([1.99 , 0 , 0 ])
51
51
52
52
group .collide (option , result )
53
53
assert result .isCollision ()
54
- assert result .getNumContacts () is not 0
54
+ assert result .getNumContacts () != 0
55
55
56
56
# Repeat the same test with BodyNodes instead of SimpleFrames
57
57
58
58
group .removeAllShapeFrames ()
59
- assert group .getNumShapeFrames () is 0
59
+ assert group .getNumShapeFrames () == 0
60
60
61
61
skel1 = dart .dynamics .Skeleton ()
62
62
skel2 = dart .dynamics .Skeleton ()
@@ -75,7 +75,7 @@ def collision_groups_tester(cd):
75
75
group .addShapeFramesOf (body1 )
76
76
group .addShapeFramesOf (body2 )
77
77
78
- assert group .getNumShapeFrames () is 2
78
+ assert group .getNumShapeFrames () == 2
79
79
80
80
assert group .collide ()
81
81
@@ -87,14 +87,14 @@ def collision_groups_tester(cd):
87
87
joint2 .setPosition (3 , 0 )
88
88
89
89
group .removeAllShapeFrames ()
90
- assert group .getNumShapeFrames () is 0
90
+ assert group .getNumShapeFrames () == 0
91
91
group2 = cd .createCollisionGroup ()
92
92
93
93
group .addShapeFramesOf (body1 )
94
94
group2 .addShapeFramesOf (body2 )
95
95
96
- assert group .getNumShapeFrames () is 1
97
- assert group2 .getNumShapeFrames () is 1
96
+ assert group .getNumShapeFrames () == 1
97
+ assert group2 .getNumShapeFrames () == 1
98
98
99
99
assert group .collide (group2 )
100
100
0 commit comments