Skip to content

Commit

Permalink
Merge pull request #37118 from Dr15Jones/silentPythonTests
Browse files Browse the repository at this point in the history
Removed excess printing in FWCore/ParameterSet tests
  • Loading branch information
cmsbuild authored Mar 3, 2022
2 parents 7e86ea4 + e0e6785 commit 9ecd969
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 135 deletions.
1 change: 0 additions & 1 deletion FWCore/ParameterSet/python/Mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def getParameter(self, params):
return getattr(self, params, None)
for param in params:
lastParam = getattr(lastParam, param, None)
print(str(lastParam))
if lastParam == None:
return None
return lastParam
Expand Down
17 changes: 12 additions & 5 deletions FWCore/ParameterSet/python/OrderedSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,15 @@ def __eq__(self, other):


if __name__ == '__main__':
s = OrderedSet('abracadaba')
t = OrderedSet('simsalabim')
print((s | t))
print((s & t))
print(s - t)
import unittest
class TestModuleCommand(unittest.TestCase):
def setUp(self):
"""Nothing to do """
pass
def testSetOperations(self):
s = OrderedSet('abracadaba')
t = OrderedSet('simsalabim')
self.assertEqual(str((s | t)), "OrderedSet(['a', 'b', 'r', 'c', 'd', 's', 'i', 'm', 'l'])")
self.assertEqual(str((s & t)), "OrderedSet(['a', 'b'])")
self.assertEqual(str(s - t),"OrderedSet(['r', 'c', 'd'])")
unittest.main()
58 changes: 0 additions & 58 deletions FWCore/ParameterSet/python/printPaths.py

This file was deleted.

71 changes: 0 additions & 71 deletions FWCore/ParameterSet/python/usedOutput.py

This file was deleted.

0 comments on commit 9ecd969

Please sign in to comment.