Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exclude-protected = ["_unfrozen"]
# PYTEST:
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--no-success-flaky-report -rsxX"
addopts = "--no-success-flaky-report -rX"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pre-commit # needed for pre-commit hooks in the git commit command

# For the test suite
pytest==7.4.4
pytest==8.1.1
pytest-asyncio==0.21.1 # needed because pytest doesn't come with native support for coroutines as tests
pytest-xdist==3.5.0 # xdist runs tests in parallel
flaky # Used for flaky tests (flaky decorator)
Expand Down
8 changes: 4 additions & 4 deletions tests/ext/test_prefixhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


def combinations(prefixes, commands):
return (prefix + command for prefix in prefixes for command in commands)
return [prefix + command for prefix in prefixes for command in commands]


class TestPrefixHandler(BaseTest):
Expand Down Expand Up @@ -94,12 +94,12 @@ async def test_basic(self, app, prefix, command):
assert isinstance(handler.commands, frozenset)
assert handler.commands == {"#cmd", "#bmd"}

def test_single_multi_prefixes_commands(self, prefixes, commands, prefix_message_update):
def test_single_multi_prefixes_commands(self, prefix_message_update):
"""Test various combinations of prefixes and commands"""
handler = self.make_default_handler()
result = is_match(handler, prefix_message_update)
expected = prefix_message_update.message.text in combinations(prefixes, commands)
return result == expected
expected = prefix_message_update.message.text in self.COMBINATIONS
assert result == expected

def test_edited(self, prefix_message):
handler_edited = self.make_default_handler()
Expand Down