Skip to content

Commit

Permalink
minor reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jul 26, 2024
1 parent 4804550 commit f68b500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 0 additions & 3 deletions test/test_mixins/test_hash_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
from test import testtools


# Tests for the hash type.


def test_hstrlen_missing(r: redis.Redis):
assert r.hstrlen("foo", "doesnotexist") == 0

Expand Down
9 changes: 4 additions & 5 deletions test/test_mixins/test_pubsub_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import fakeredis
from .. import testtools
from ..testtools import raw_command


def wait_for_message(pubsub: PubSub, timeout=0.5, ignore_subscribe_messages=False) -> Optional[Dict[str, Any]]:
Expand Down Expand Up @@ -358,13 +357,13 @@ def test_pubsub_channels_pattern(r: redis.Redis):

def test_pubsub_no_subcommands(r: redis.Redis):
with pytest.raises(redis.ResponseError):
raw_command(r, "PUBSUB")
testtools.raw_command(r, "PUBSUB")


@pytest.mark.min_server("7")
@pytest.mark.max_server("7")
def test_pubsub_help_redis7(r: redis.Redis):
assert raw_command(r, "PUBSUB HELP") == [
assert testtools.raw_command(r, "PUBSUB HELP") == [
b"PUBSUB <subcommand> [<arg> [value] [opt] ...]. Subcommands are:",
b"CHANNELS [<pattern>]",
b" Return the currently active channels matching a <pattern> (default: '*')" b".",
Expand All @@ -384,7 +383,7 @@ def test_pubsub_help_redis7(r: redis.Redis):

@pytest.mark.min_server("7.1")
def test_pubsub_help_redis71(r: redis.Redis):
assert raw_command(r, "PUBSUB HELP") == [
assert testtools.raw_command(r, "PUBSUB HELP") == [
b"PUBSUB <subcommand> [<arg> [value] [opt] ...]. Subcommands are:",
b"CHANNELS [<pattern>]",
b" Return the currently active channels matching a <pattern> (default: '*')" b".",
Expand All @@ -404,7 +403,7 @@ def test_pubsub_help_redis71(r: redis.Redis):

@pytest.mark.max_server("6.2.7")
def test_pubsub_help_redis6(r: redis.Redis):
assert raw_command(r, "PUBSUB HELP") == [
assert testtools.raw_command(r, "PUBSUB HELP") == [
b"PUBSUB <subcommand> [<arg> [value] [opt] ...]. Subcommands are:",
b"CHANNELS [<pattern>]",
b" Return the currently active channels matching a <pattern> (default: '*')" b".",
Expand Down

0 comments on commit f68b500

Please sign in to comment.