Skip to content

Commit 9d6fa89

Browse files
committed
Use dict literal instead of constructor function
1 parent b4c0215 commit 9d6fa89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webware/PSP/Tests/TestUtils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ def testStartsNewBlock(self):
4747

4848
def testCheckAttributes(self):
4949
checkAttributes = PSPUtils.checkAttributes
50-
for attrs in (dict(man=1), dict(man=1, opt=1)):
50+
for attrs in ({'man': 1}, {'man': 1, 'opt': 1}):
5151
checkAttributes('test', attrs, (['man'], ['opt']))
5252
PSPParserException = PSPUtils.PSPParserException
53-
for attrs in (dict(), dict(opt=1), dict(man=1, noopt=1)):
53+
for attrs in ({}, {'man': 1}, {'man': 1, 'noopt': 1}):
5454
self.assertRaises(
5555
PSPParserException, checkAttributes,
5656
'test', attrs, (['man'], ['opt']))
5757
self.assertRaises(
5858
PSPParserException, checkAttributes,
59-
'test', dict(opt=1), (['man1', 'man2'], []))
59+
'test', {'opt': 1}, (['man1', 'man2'], []))
6060
self.assertRaises(
6161
PSPParserException, checkAttributes,
62-
'test', dict(man=1), ([], ['opt1', 'opt2']))
62+
'test', {'man': 1}, ([], ['opt1', 'opt2']))
6363

6464
def testNormalizeIndentation(self):
6565
normalizeIndentation = PSPUtils.normalizeIndentation

0 commit comments

Comments
 (0)