Skip to content

Commit

Permalink
Fix tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil21 committed Feb 16, 2024
1 parent 9a27e51 commit 6779e7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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
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

0 comments on commit 6779e7d

Please sign in to comment.