From 0f4bc18ceb5ef5e55e003da409a3da8e3e1d9cf8 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Thu, 4 Aug 2022 14:54:09 +0100 Subject: Disable nose plugin in pytest This fixes an issue with pytest running functions called setup in test files when they shouldn't be run --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 77d8ee3d4..255710386 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,3 +84,9 @@ case_sensitive = true combine_as_imports = true line_length = 120 atomic = true + +[tool.pytest.ini_options] +# We don't use nose style tests so disable them in pytest. +# This stops pytest from running functions named `setup` in test files. +# See https://github.com/python-discord/bot/pull/2229#issuecomment-1204436420 +addopts = "-p no:nose" -- cgit v1.2.3