Skip to content

Commit c5cf88a

Browse files
committed
Make hook tests compatible with python 3.4
1 parent cae060f commit c5cf88a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/core_tests/test_plugin_hooks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from numbers import Number
77
from pathlib import Path
88

9-
import pytest
109
from sqlalchemy import MetaData
1110

1211
from cloudbot.hook import Action
@@ -48,8 +47,8 @@ def load_plugin(plugin_path, monkeypatch):
4847

4948
def pytest_generate_tests(metafunc):
5049
if 'plugin_path' in metafunc.fixturenames:
51-
param_list = (pytest.param(path, id=path) for path in gather_plugins())
52-
metafunc.parametrize('plugin_path', param_list)
50+
paths = list(gather_plugins())
51+
metafunc.parametrize('plugin_path', paths, ids=paths)
5352

5453

5554
HOOK_ATTR_TYPES = {
@@ -87,5 +86,5 @@ def _test_hook(hook):
8786
"Unexpected type '{}' for hook attribute '{}'".format(type(attr).__name__, name)
8887

8988
if hook.type == "command" and hook.doc:
90-
assert hook.doc[:1] not in "." + string.ascii_letters,\
89+
assert hook.doc[:1] not in "." + string.ascii_letters, \
9190
"Invalid docstring '{}' format for command hook".format(hook.doc)

0 commit comments

Comments
 (0)