From 26d94b68d9005e24043bfd3bc5b5c368e59c5e2b Mon Sep 17 00:00:00 2001 From: Peter Rice Date: Sun, 5 Mar 2023 21:43:12 -0500 Subject: [PATCH] run ruff on tests --- .builds/qbpm.yml | 2 +- ruff.toml | 4 ++++ tests/test_profiles.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.builds/qbpm.yml b/.builds/qbpm.yml index 78aade4..a58ec79 100644 --- a/.builds/qbpm.yml +++ b/.builds/qbpm.yml @@ -12,7 +12,7 @@ tasks: $NIX develop .#ci -c black --diff --check qbpm tests - ruff: | cd qbpm - $NIX develop .#ci -c ruff qbpm + $NIX develop .#ci -c ruff qbpm tests - mypy: | cd qbpm $NIX develop .#ci -c mypy qbpm tests diff --git a/ruff.toml b/ruff.toml index eedfbab..ec263fd 100644 --- a/ruff.toml +++ b/ruff.toml @@ -6,3 +6,7 @@ ignore = [ "ANN102", # annotate cls "ANN401", # ban Any ] + +[per-file-ignores] +"tests/test_main.py" = [ "S101", "ANN201"] +"tests/test_profiles.py" = [ "S101", "ANN201"] diff --git a/tests/test_profiles.py b/tests/test_profiles.py index da252aa..c08e45b 100644 --- a/tests/test_profiles.py +++ b/tests/test_profiles.py @@ -71,7 +71,7 @@ def test_overwrite_config(tmp_path: Path): for line in conf: if url in line: return - assert False + raise AssertionError() def test_ensure_profile_exists_exists(tmp_path: Path):