summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-10-17 14:38:53 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-10-17 14:38:53 (GMT)
commit15e71f0e56dd21dad0babb09b4e2fe5cbb090be4 (patch)
treeeabd232a05137d0ea64ae0605f5b4b290e3ca565
parenta6561696dbb32cad18386cee6601cbc0624cc043 (diff)
downloadSCons-15e71f0e56dd21dad0babb09b4e2fe5cbb090be4.zip
SCons-15e71f0e56dd21dad0babb09b4e2fe5cbb090be4.tar.gz
SCons-15e71f0e56dd21dad0babb09b4e2fe5cbb090be4.tar.bz2
Add testcase to demonstrate specifying dict.values() on py3 fails. as it returns a dict_values object and not a list
-rw-r--r--src/engine/SCons/UtilTests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py
index bee7d6e..7ff509e 100644
--- a/src/engine/SCons/UtilTests.py
+++ b/src/engine/SCons/UtilTests.py
@@ -877,6 +877,12 @@ class flattenTestCase(unittest.TestCase):
result = flatten('xyz')
assert result == ['xyz'], result
+ def test_dictionary_values(self):
+ """Test flattening the dictionary values"""
+ items = {"a": 1, "b": 2, "c": 3}
+ result = flatten(items.values())
+ self.assertEquals(sorted(result),[1,2,3])
+
if __name__ == "__main__":
unittest.main()