【发布时间】:2021-03-01 16:18:54
【问题描述】:
当我运行 flake8 时,出现以下错误:
./test_sample.py:4:2: PT006 wrong name(s) type in @pytest.mark.parametrize, expected tuple
这是我的代码
import pytest
@pytest.mark.parametrize('foo,bar', [(1, 1), (2, 2)])
def test_foo(foo, bar):
assert foo == bar
pip freeze | egrep flake8:
flake8==3.8.4
flake8-plugin-utils==1.3.1
flake8-pytest-style==1.3.0
如何修复错误?
【问题讨论】:
标签: python python-3.x pytest flake8