Skip to content

Commit 6e7fb5f

Browse files
committed
Avoid trying to print tuples as strings.
- Python doesn't like it. - Also updated inline comments with regards to acceptable types for the values of constants.
1 parent 4c5892c commit 6e7fb5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/framework/easyconfigparser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ def test_easyconfig_constants(self):
180180
system_constant = constants.pop('SYSTEM')
181181
self.assertEqual(system_constant, {'name': 'system', 'version': 'system'})
182182

183-
# make sure both keys and values are only strings
183+
# make sure both keys and values are of appropriate types
184184
for constant_name in constants:
185185
self.assertTrue(isinstance(constant_name, string_type), "Constant name %s is a string" % constant_name)
186186
val = constants[constant_name]
187-
self.assertTrue(isinstance(val, (string_type, dict, tuple)), "Constant value %s is string, dict or tuple" % val)
187+
self.assertTrue(isinstance(val, (string_type, dict, tuple)),
188+
"The constant %s has an acceptable type" % constant_name)
188189

189190
# check a couple of randomly picked constant values
190191
self.assertEqual(constants['SOURCE_TAR_GZ'], '%(name)s-%(version)s.tar.gz')

0 commit comments

Comments
 (0)