From 83152bdc24b2d093d2b1ae06c42348b4149dbe20 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 3 Jul 2021 09:40:49 +0200 Subject: [PATCH] unreal: deselect tests depending on +draft/react Unreal won't support them 1st-party: https://github.com/unrealircd/unrealircd/pull/149 --- Makefile | 4 +++- irctest/server_tests/test_labeled_responses.py | 7 +++++++ pytest.ini | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 55c5aba..85b29ce 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,8 @@ SOPEL_SELECTORS := \ # test_regressions::testTagCap fails: https://bugs.unrealircd.org/view.php?id=5948 # test_messages::testLineTooLong fails: https://bugs.unrealircd.org/view.php?id=5947 # testCapRemovalByClient and testNakWhole fail pending https://github.com/unrealircd/unrealircd/pull/148 -# Tests marked with arbitrary_client_tags can't pass because Unreal whitelists tags it relays +# Tests marked with arbitrary_client_tags can't pass because Unreal whitelists which tags it relays +# Tests marked with react_tag can't pass because Unreal blocks +draft/react https://github.com/unrealircd/unrealircd/pull/149 UNREALIRCD_SELECTORS := \ not Ergo \ and not deprecated \ @@ -74,6 +75,7 @@ UNREALIRCD_SELECTORS := \ and not (test_messages and testLineTooLong) \ and not (test_cap and (testCapRemovalByClient or testNakWhole)) \ and not arbitrary_client_tags \ + and not react_tag \ $(EXTRA_SELECTORS) .PHONY: all flakes charybdis ergo inspircd mammon limnoria sopel solanum unrealircd diff --git a/irctest/server_tests/test_labeled_responses.py b/irctest/server_tests/test_labeled_responses.py index 4ad03ab..0cc1bf5 100644 --- a/irctest/server_tests/test_labeled_responses.py +++ b/irctest/server_tests/test_labeled_responses.py @@ -7,6 +7,8 @@ so there may be many false positives. import re +import pytest + from irctest import cases from irctest.patma import ANYDICT, AnyOptStr, NotStrRe, RemainingKeys, StrRe @@ -89,6 +91,7 @@ class LabeledResponsesTestCase(cases.BaseServerTestCase, cases.OptionalityHelper self.assertMessageMatch(m, command="PRIVMSG", tags={"label": "12345"}) + @pytest.mark.react_tag @cases.mark_capabilities("echo-message", "batch", "labeled-response") def testLabeledPrivmsgResponsesToChannel(self): self.connectClient( @@ -190,6 +193,7 @@ class LabeledResponsesTestCase(cases.BaseServerTestCase, cases.OptionalityHelper self.assertMessageMatch(m, command="NOTICE", tags={"label": "12345"}) + @pytest.mark.react_tag @cases.mark_capabilities("echo-message", "batch", "labeled-response") def testLabeledNoticeResponsesToChannel(self): self.connectClient( @@ -265,6 +269,7 @@ class LabeledResponsesTestCase(cases.BaseServerTestCase, cases.OptionalityHelper ).format(number_of_labels), ) + @pytest.mark.react_tag @cases.mark_capabilities( "echo-message", "batch", "labeled-response", "message-tags" ) @@ -325,6 +330,7 @@ class LabeledResponsesTestCase(cases.BaseServerTestCase, cases.OptionalityHelper }, ) + @pytest.mark.react_tag @cases.mark_capabilities( "echo-message", "batch", "labeled-response", "message-tags" ) @@ -389,6 +395,7 @@ class LabeledResponsesTestCase(cases.BaseServerTestCase, cases.OptionalityHelper tags={"label": "12345", "+draft/reply": msgid, **ANYDICT}, ) + @pytest.mark.react_tag @cases.mark_capabilities( "echo-message", "batch", "labeled-response", "message-tags" ) diff --git a/pytest.ini b/pytest.ini index eadf6f4..21bec0b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -13,6 +13,7 @@ markers = deprecated services arbitrary_client_tags + react_tag # capabilities account-tag