diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-30 10:54:34 -0500 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2019-01-25 12:50:05 +0200 |
commit | 60669579a7e3189112ce4ecb983928040af79e73 (patch) | |
tree | ad37563b97554d7633bfe06927773ad2798c6901 /tests | |
parent | e4d834d4c1bffe05e71ee2ec21449b6b0b115e99 (diff) | |
download | babel-60669579a7e3189112ce4ecb983928040af79e73.tar.gz |
Replace odict with Python's collection.OrderedDict
The odict class duplicates collection.OrderedDict from Python's standard
lib. Simplify the code by using builtin Python features.
https://docs.python.org/3/library/collections.html#collections.OrderedDict
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_util.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index ef59110..0fc59e5 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -38,20 +38,6 @@ def test_pathmatch(): assert not util.pathmatch('./foo/**.py', 'blah/foo/bar/baz.py') -def test_odict_pop(): - odict = util.odict() - odict[0] = 1 - value = odict.pop(0) - assert 1 == value - assert [] == list(odict.items()) - assert odict.pop(2, None) is None - try: - odict.pop(2) - assert False - except KeyError: - assert True - - class FixedOffsetTimezoneTestCase(unittest.TestCase): def test_zone_negative_offset(self): |