Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Added SPOP command #1261

Merged
merged 22 commits into from
Apr 14, 2024
Merged

Python: Added SPOP command #1261

merged 22 commits into from
Apr 14, 2024

Conversation

GilboaAWS
Copy link
Collaborator

No description provided.

@GilboaAWS GilboaAWS requested a review from a team as a code owner April 10, 2024 12:19
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/transaction.py Outdated Show resolved Hide resolved
glide-core/src/client/value_conversion.rs Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
member3 = get_random_string(5)
assert await redis_client.sadd(key, [member, member2, member3]) == 3
assert await redis_client.spop_count(key, 4) == {member, member2, member3}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check that nothing left in the set

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

member3 = get_random_string(5)
assert await redis_client.sadd(key, [member, member2, member3]) == 3
assert await redis_client.spop_count(key, 4) == {member, member2, member3}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GilboaAWS GilboaAWS force-pushed the spop_python branch 4 times, most recently from 363c844 to 8c549fa Compare April 11, 2024 12:27
#[test]
fn test_convert_spop_to_set_for_spop_count() {
assert!(matches!(
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("count")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("count")),
expected_type_for_cmd(redis::cmd("SPOP").arg("key1").arg("3")),

python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/core.py Outdated Show resolved Hide resolved
python/python/glide/async_commands/transaction.py Outdated Show resolved Hide resolved
@GilboaAWS GilboaAWS merged commit f3abf24 into valkey-io:main Apr 14, 2024
44 of 45 checks passed
@GilboaAWS GilboaAWS deleted the spop_python branch April 14, 2024 14:07
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants