@@ -399,7 +399,7 @@ def test_validate_config(self):
399
399
400
400
for topo_test in testdata :
401
401
image_meta = objects .ImageMeta .from_dict (topo_test ["image" ])
402
- if type (topo_test ["expect" ]) == tuple :
402
+ if type (topo_test ["expect" ]) is tuple :
403
403
(preferred , maximum ) = hw .get_cpu_topology_constraints (
404
404
topo_test ["flavor" ], image_meta )
405
405
@@ -525,7 +525,7 @@ def test_possible_topologies(self):
525
525
]
526
526
527
527
for topo_test in testdata :
528
- if type (topo_test ["expect" ]) == list :
528
+ if type (topo_test ["expect" ]) is list :
529
529
actual = []
530
530
for topology in hw ._get_possible_cpu_topologies (
531
531
topo_test ["vcpus" ],
@@ -1001,7 +1001,7 @@ def test_cpu_policy_constraint(self):
1001
1001
cpu_policy = hw .get_cpu_policy_constraint (
1002
1002
testitem ["flavor" ], image_meta )
1003
1003
self .assertIsNone (cpu_policy )
1004
- elif type (testitem ["expect" ]) == type :
1004
+ elif type (testitem ["expect" ]) is type :
1005
1005
self .assertRaises (testitem ["expect" ],
1006
1006
hw .get_cpu_policy_constraint ,
1007
1007
testitem ["flavor" ],
@@ -1990,7 +1990,7 @@ def test_topology_constraints(self):
1990
1990
topology = hw .numa_get_constraints (
1991
1991
testitem ["flavor" ], image_meta )
1992
1992
self .assertIsNone (topology )
1993
- elif type (testitem ["expect" ]) == type :
1993
+ elif type (testitem ["expect" ]) is type :
1994
1994
self .assertRaises (testitem ["expect" ],
1995
1995
hw .numa_get_constraints ,
1996
1996
testitem ["flavor" ],
0 commit comments