From 4da19d50bf1b70247176c9d086ab8004b0c570e2 Mon Sep 17 00:00:00 2001 From: pwwang Date: Wed, 13 Mar 2024 23:02:49 -0500 Subject: [PATCH] tests: adopt pytest v8 --- poetry.lock | 18 +++++++++--------- pyproject.toml | 2 +- tests/test_plugin.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/poetry.lock b/poetry.lock index f55451dc..bb838dce 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "colorama" @@ -527,13 +527,13 @@ numpy = ">=1.16.6" [[package]] name = "pytest" -version = "7.4.4" +version = "8.1.1" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, + {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, ] [package.dependencies] @@ -541,11 +541,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.4,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-cov" @@ -741,4 +741,4 @@ pandas = ["datar-pandas"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "fd07a881dc74a601707d2619c4c083ac793a89ee60846b58f26c5465017fb4c9" +content-hash = "16e471472f5de05230a7db03f9ff208e268b1074143ad3939c10a8e09f4afb76" diff --git a/pyproject.toml b/pyproject.toml index 1c03bb89..8b3fcf57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ arrow = ["datar-arrow"] # polars = ["datar-polars"] [tool.poetry.group.dev.dependencies] -pytest = "^7" +pytest = "^8.1" pytest-cov = "^4" six = "^1.16" numpy = "^1.17" diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 6f1c4464..4958a97c 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -57,7 +57,7 @@ def operate(op, x, y=None): return None -def setup(): +def setup_function(function): plugin.register(TestPlugin1) plugin.register(TestPlugin2) plugin.get_plugin("testplugin1").disable()