summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-09-28 09:39:50 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-09-28 09:39:50 -0400
commit3ca1ef62249e0e93a34f4638e9ab995207dafc8c (patch)
tree73c9cd9f82e4a64e268765b5807460279acd41ea /tests
parent7881636a45a68127284c924a2dc7beff1ad7f3f9 (diff)
downloadpython-coveragepy-3ca1ef62249e0e93a34f4638e9ab995207dafc8c.tar.gz
Make iteritems detection more like the rest of backward.py, and add a test of it.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_backward.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_backward.py b/tests/test_backward.py
new file mode 100644
index 0000000..63ee20d
--- /dev/null
+++ b/tests/test_backward.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+"""Tests that our version shims in backward.py are working."""
+
+from coverage.backward import iitems
+from tests.backunittest import TestCase
+
+
+class BackwardTest(TestCase):
+ """Tests of things from backward.py."""
+
+ run_in_temp_dir = False
+
+ def test_iitems(self):
+ d = {'a': 1, 'b': 2, 'c': 3}
+ items = [('a', 1), ('b', 2), ('c', 3)]
+ self.assertSameElements(list(iitems(d)), items)