Skip to content

Commit

Permalink
Fix collections deprecation in test_tags
Browse files Browse the repository at this point in the history
Since Python 3.10, Iterator must be imported from collections.abc rather
than collections.

Signed-off-by: František Nečas <fnecas@redhat.com>
  • Loading branch information
František Nečas authored and nforro committed Feb 10, 2021
1 parent bfde7e1 commit e778492
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rebasehelper/tests/public_api/test_tags.py
Expand Up @@ -22,7 +22,7 @@
# Nikola Forró <nforro@redhat.com>
# František Nečas <fifinecas@seznam.cz>

import collections
import collections.abc

import pytest # type: ignore

Expand All @@ -39,8 +39,8 @@ def test_contructor(self):

def test_filter(self, spec_object):
result = spec_object.tags.filter()
assert isinstance(result, collections.Iterator)
assert isinstance(result, collections.abc.Iterator)
assert isinstance(next(result), Tag)
result = spec_object.tags.filter(section_index=0, section_name='%package', name='Source*', valid=True)
assert isinstance(result, collections.Iterator)
assert isinstance(result, collections.abc.Iterator)
assert isinstance(next(result), Tag)

0 comments on commit e778492

Please sign in to comment.