From 8f61287f980cc9c27e14c4aaf905ea74d7745797 Mon Sep 17 00:00:00 2001 From: Pietro Pasotti Date: Fri, 9 Feb 2024 13:50:00 +0100 Subject: [PATCH] lint --- tests/unit/test_e2e.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/tests/unit/test_e2e.py b/tests/unit/test_e2e.py index 3c3c550..e6f9f12 100644 --- a/tests/unit/test_e2e.py +++ b/tests/unit/test_e2e.py @@ -5,17 +5,17 @@ import pytest from ops import CharmBase from scenario import State +from utils import CRI_LIKE_PATH from interface_tester import InterfaceTester from interface_tester.collector import gather_test_spec_for_version -from interface_tester.errors import SchemaValidationError, InvalidTestCaseError +from interface_tester.errors import InvalidTestCaseError, SchemaValidationError from interface_tester.interface_test import ( InvalidTesterRunError, NoSchemaError, NoTesterInstanceError, Tester, ) -from utils import CRI_LIKE_PATH class LocalTester(InterfaceTester): @@ -150,7 +150,9 @@ def test_data_on_changed(): with pytest.raises(InvalidTestCaseError) as e: tester.run() - assert e.match("Bad interface test specification: event foobadooble-changed is not a relation event.") + assert e.match( + "Bad interface test specification: event foobadooble-changed is not a relation event." + ) def test_error_if_assert_relation_data_empty_before_run(): @@ -304,17 +306,10 @@ def test_data_on_changed(): tester.run() -@pytest.mark.parametrize("endpoint", ( - "foo-one", - "prometheus-scrape", - "foobadoodle", - "foo-one-two")) -@pytest.mark.parametrize("evt_type", ( - "changed", - "created", - "joined", - "departed", - "broken")) +@pytest.mark.parametrize( + "endpoint", ("foo-one", "prometheus-scrape", "foobadoodle", "foo-one-two") +) +@pytest.mark.parametrize("evt_type", ("changed", "created", "joined", "departed", "broken")) def test_valid_run(endpoint, evt_type): tester = _setup_with_test_file( dedent(