Skip to content

Commit

Permalink
Removed used of assertEquals in python test
Browse files Browse the repository at this point in the history
This was generating a deprecation warning
  • Loading branch information
Dr15Jones committed Oct 8, 2021
1 parent 7403d38 commit 79201c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FWCore/ParameterSet/python/Types.py
Expand Up @@ -8,6 +8,7 @@
import copy
import math
import builtins
import typing

_builtin_bool = bool

Expand Down Expand Up @@ -2000,15 +2001,15 @@ def testAllowed(self):
p2 = PSet(aValue=optional.allowed(int32,PSet))
self.assertEqual(p2.dumpPython(),'cms.PSet(\n aValue = cms.optional.allowed(cms.int32,cms.PSet)\n)')
p2.aValue = 2
self.assertEquals(p2.aValue.value(),2)
self.assertEqual(p2.aValue.value(),2)
p2 = PSet(aValue=optional.allowed(int32,PSet))
p2.aValue = PSet(i = int32(3))
self.assertEqual(p2.aValue.i.value(),3)

p2 = PSet(aValue=optional.untracked.allowed(int32,PSet))
self.assertEqual(p2.dumpPython(),'cms.PSet(\n aValue = cms.optional.untracked.allowed(cms.int32,cms.PSet)\n)')
p2.aValue = 2
self.assertEquals(p2.aValue.value(),2)
self.assertEqual(p2.aValue.value(),2)
p2 = PSet(aValue=optional.untracked.allowed(int32,PSet))
p2.aValue = PSet(i = int32(3))
self.assertEqual(p2.aValue.i.value(),3)
Expand Down

0 comments on commit 79201c8

Please sign in to comment.