repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wee-slack/wee-slack | train | 53 | 9d1d4b8ebcf75ec5bf1daf18feb497dc4393c108 | train | _pytest/test_command_reply.py | train | wee-slack/wee-slack:_pytest/test_command_reply.py | 25 | 4 | assert | test_replying_to_child_should_use_parent_ts | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS, command_reply
parent_ts = SlackTS('1485975824.000004')
child_ts = SlackTS('1485975835.000005')
def test_replying_to_child_should_use_parent_ts(realish_eventrouter, team, channel_general):
datafiles = [
... | parent_ts | modified | 72287c81350ad05d6945567f3f82689bfd3523ef809102b3aad41eb05616a504 | assert|test_replying_to_child_should_use_parent_ts|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS, command_reply parent_ts = SlackTS('1485975824.000004') child_ts = SlackTS('1485975835.000005') def test_replying_to_child_should_use_parent_ts(realish_eventrouter, team, ... | parent_ts | 25 | 4 |
wee-slack/wee-slack | train | 54 | 8ca00d735279e78e759e72c6dff4c17fa43405d5 | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 274 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize('case', (
{
'input_message': {'attachments': [{
'title': 'Title',
}]},
'input_text_before': "Text before",
'output': "\n".join([
"",
... | case['output'] | modified | 4a1cb3b4d80be92c337bff498ddab812d58d998befccea4635d023bcf7562182 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize('case', ( { 'input_message': {'attachments': [{ 'title': 'Title', }]}, 'input_text_before': "Text before", 'output': "\n".join([ "", "| Title", ]), }, { 'input_message': {'attac... | case['output'] | 273 | 4 |
wee-slack/wee-slack | train | 55 | 7a4a95baafc78682288acaa1b4622d87eed1db3e | train | _pytest/test_formatting.py | train | wee-slack/wee-slack:_pytest/test_formatting.py | 17 | 4 | assert | test_does_not_format | from __future__ import print_function, unicode_literals
import pytest
import re
import wee_slack
@pytest.mark.parametrize("text", [
"""
* an item
* another item
""",
"* Run this command: `find . -name '*.exe'`",
])
def test_does_not_format(realish_eventrouter, text):
assert wee_slack.render_... | text | modified | 13e60ef81cd14ed4b856481c06f6515a6d12c21c81785cf578da9c9bbd7154f5 | assert|test_does_not_format|from __future__ import print_function, unicode_literals import pytest import re import wee_slack @pytest.mark.parametrize("text", [ """ * an item * another item """, "* Run this command: `find . -name '*.exe'`", ]) def test_does_not_format(realish_eventrouter, text): assert wee_slack.render_... | text | 16 | 4 |
wee-slack/wee-slack | train | 55 | 7a4a95baafc78682288acaa1b4622d87eed1db3e | train | _pytest/test_formatting.py | train | wee-slack/wee-slack:_pytest/test_formatting.py | 33 | 4 | assert | test_preserves_format_chars_in_code | from __future__ import print_function, unicode_literals
import pytest
import re
import wee_slack
@pytest.mark.parametrize("text", [
"""
* an item
* another item
""",
"* Run this command: `find . -name '*.exe'`",
])
def test_does_not_format(realish_eventrouter, text):
assert wee_slack.render_... | text | added | a7bd333b41151ce68b2d4e11a29c48cf89d27f2e021b52c60df09c8f8ceacc96 | assert|test_preserves_format_chars_in_code|from __future__ import print_function, unicode_literals import pytest import re import wee_slack @pytest.mark.parametrize("text", [ """ * an item * another item """, "* Run this command: `find . -name '*.exe'`", ]) def test_does_not_format(realish_eventrouter, text): assert we... | null | null | null |
wee-slack/wee-slack | train | 55 | 7a4a95baafc78682288acaa1b4622d87eed1db3e | train | _pytest/test_process_message.py | train | wee-slack/wee-slack:_pytest/test_process_message.py | 49 | 4 | assert | test_process_message | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
def test_process_message(realish_eventrouter, team, user_alice):
messages = []
messages.append(json.loads(open('_pytest/data/websocket/1485975421.33-message.json', 'r').read()))
# test message and then cha... | deleted_str | modified | 22836c8be4411cd18c9c93d9f20adbb6eb7fdf683e51787b7cd60d3b1109ad36 | assert|test_process_message|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS def test_process_message(realish_eventrouter, team, user_alice): messages = [] messages.append(json.loads(open('_pytest/data/websocket/1485975421.33-message.json', 'r').read())) # test message a... | '(deleted)' | 48 | 4 |
wee-slack/wee-slack | train | 55 | 7a4a95baafc78682288acaa1b4622d87eed1db3e | train | _pytest/test_thread.py | val | wee-slack/wee-slack:_pytest/test_thread.py | 28 | 4 | assert | test_message_has_thread_suffix | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
thread_ts = SlackTS('1485975824.000004')
def test_message_has_thread_suffix(realish_eventrouter, team, channel_general):
datafile = '_pytest/data/websocket/1485975824.48-message.json'
data = json.loads(open(d... | 'generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 1 ]<[color reset]>' | modified | 5e74714a6ce3b72e08d308485b550bf14f08fc0db686038f6025033707cb5762 | assert|test_message_has_thread_suffix|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS thread_ts = SlackTS('1485975824.000004') def test_message_has_thread_suffix(realish_eventrouter, team, channel_general): datafile = '_pytest/data/websocket/1485975824.48-message.json' ... | 'generally, yep! [ Thread: 309 Replies: 1 ]' | 28 | 4 |
wee-slack/wee-slack | train | 55 | 7a4a95baafc78682288acaa1b4622d87eed1db3e | train | _pytest/test_thread.py | val | wee-slack/wee-slack:_pytest/test_thread.py | 37 | 4 | assert | test_message_has_thread_suffix | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
thread_ts = SlackTS('1485975824.000004')
def test_message_has_thread_suffix(realish_eventrouter, team, channel_general):
datafile = '_pytest/data/websocket/1485975824.48-message.json'
data = json.loads(open(d... | 'generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 2 ]<[color reset]>' | modified | 886aafbf312ee0ba6079cd195d21e05ae82a51a453ac0ca87d06287d854f3137 | assert|test_message_has_thread_suffix|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS thread_ts = SlackTS('1485975824.000004') def test_message_has_thread_suffix(realish_eventrouter, team, channel_general): datafile = '_pytest/data/websocket/1485975824.48-message.json' ... | 'generally, yep! [ Thread: 309 Replies: 2 ]' | 37 | 4 |
wee-slack/wee-slack | train | 56 | e6446b84db52d9c5b6adf6c8869ab3d12e6f2ce4 | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 294 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize('case', (
{
'input_message': {'attachments': [{
'title': 'Title',
}]},
'input_text_before': "Text before",
'output': "\n".join([
"",
... | case['output'] | added | 0a543cb53f970ae2759670202c7c96759caf1ed9df245335f76238948935eb43 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize('case', ( { 'input_message': {'attachments': [{ 'title': 'Title', }]}, 'input_text_before': "Text before", 'output': "\n".join([ "", "| Title", ]), }, { 'input_message': {'attac... | null | null | null |
wee-slack/wee-slack | train | 57 | 1c5883f1dedcf70edcc140712d7008038ed2ffa2 | train | _pytest/test_formatted_name.py | val | wee-slack/wee-slack:_pytest/test_formatted_name.py | 201 | 4 | assert | test_formatted_name | from __future__ import print_function, unicode_literals
import pytest
import wee_slack
@pytest.mark.parametrize('case', (
{
"type": "channel",
"style": "default",
"typing": False,
"present": False,
"name": "#general"
},
{
"type": "channel",
"style":... | case["name"] | added | 10a13d82940ab8ca63179ea807c0d4216eb1bdaee13e6207fa62afae3bbba243 | assert|test_formatted_name|from __future__ import print_function, unicode_literals import pytest import wee_slack @pytest.mark.parametrize('case', ( { "type": "channel", "style": "default", "typing": False, "present": False, "name": "#general" }, { "type": "channel", "style": "default", "typing": True, "present": True,... | null | null | null |
wee-slack/wee-slack | train | 58 | 480319843b80dbdbf2bcf3959c14715862fb80ea | train | _pytest/test_unfurl.py | train | wee-slack/wee-slack:_pytest/test_unfurl.py | 171 | 4 | assert | test_unfurl_refs | from __future__ import print_function, unicode_literals
from datetime import datetime, timedelta
import pytest
import time
import wee_slack
import os
os.environ['TZ'] = 'UTC'
@pytest.mark.parametrize('case', (
{
'input': "foo",
'output': "foo",
},
{
'input': "<!channel>",
... | case['output'] | modified | 913d97dc9e70ef466b2d5520731ebac847657a17a9dce5d2748cbc5d4860f470 | assert|test_unfurl_refs|from __future__ import print_function, unicode_literals from datetime import datetime, timedelta import pytest import time import wee_slack import os os.environ['TZ'] = 'UTC' @pytest.mark.parametrize('case', ( { 'input': "foo", 'output': "foo", }, { 'input': "<!channel>", 'output': "@channel", }... | case['output'] | 169 | 4 |
wee-slack/wee-slack | train | 59 | 3be133d473a1a3965efb1bfcb2927325f6bdfd67 | train | _pytest/test_processreply.py | train | wee-slack/wee-slack:_pytest/test_processreply.py | 14 | 4 | assert | test_process_reply | from __future__ import print_function, unicode_literals
from wee_slack import SlackTS
def test_process_reply(realish_eventrouter, team, channel_general):
message_ts = SlackTS('12341234.123456')
message_text = 'reply test'
channel_general.send_message(message_text)
team.ws.add({'ok': True, 'reply_to':... | channel_general.messages | modified | 969410aca0c367ef5c10d721978808c94703881f4d838de2158835984dbc4d82 | assert|test_process_reply|from __future__ import print_function, unicode_literals from wee_slack import SlackTS def test_process_reply(realish_eventrouter, team, channel_general): message_ts = SlackTS('12341234.123456') message_text = 'reply test' channel_general.send_message(message_text) team.ws.add({'ok': True, 'rep... | channel_general.messages | 14 | 4 |
wee-slack/wee-slack | train | 59 | 3be133d473a1a3965efb1bfcb2927325f6bdfd67 | train | _pytest/test_processreply.py | train | wee-slack/wee-slack:_pytest/test_processreply.py | 16 | 4 | assert | test_process_reply | from __future__ import print_function, unicode_literals
from wee_slack import SlackTS
def test_process_reply(realish_eventrouter, team, channel_general):
message_ts = SlackTS('12341234.123456')
message_text = 'reply test'
channel_general.send_message(message_text)
team.ws.add({'ok': True, 'reply_to':... | message_ts | modified | a43c78bbd67ac9f3f713e24a66c1e81ac05b9cdf00acbdb120df84e6f5cb4064 | assert|test_process_reply|from __future__ import print_function, unicode_literals from wee_slack import SlackTS def test_process_reply(realish_eventrouter, team, channel_general): message_ts = SlackTS('12341234.123456') message_text = 'reply test' channel_general.send_message(message_text) team.ws.add({'ok': True, 'rep... | message_ts | 16 | 4 |
wee-slack/wee-slack | train | 59 | 3be133d473a1a3965efb1bfcb2927325f6bdfd67 | train | _pytest/test_processreply.py | train | wee-slack/wee-slack:_pytest/test_processreply.py | 17 | 4 | assert | test_process_reply | from __future__ import print_function, unicode_literals
from wee_slack import SlackTS
def test_process_reply(realish_eventrouter, team, channel_general):
message_ts = SlackTS('12341234.123456')
message_text = 'reply test'
channel_general.send_message(message_text)
team.ws.add({'ok': True, 'reply_to':... | message_text | modified | 2525df66cc1dd9eb55c744bdabbe3d34bf2744fdc4ded1a476952d4383b51e8e | assert|test_process_reply|from __future__ import print_function, unicode_literals from wee_slack import SlackTS def test_process_reply(realish_eventrouter, team, channel_general): message_ts = SlackTS('12341234.123456') message_text = 'reply test' channel_general.send_message(message_text) team.ws.add({'ok': True, 'rep... | message_text | 17 | 4 |
wee-slack/wee-slack | train | 60 | fef777b7dced08c4299c8aa2d3a8065371194b21 | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 325 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize('case', (
{
'input_message': {'attachments': [{
'title': 'Title',
}]},
'input_text_before': "Text before",
'output': "\n".join([
"",
... | case['output'] | added | 636368b5dd367bcc83959e6cfb27bdd93427fad1ed3a4c829082a9105dd4bb63 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize('case', ( { 'input_message': {'attachments': [{ 'title': 'Title', }]}, 'input_text_before': "Text before", 'output': "\n".join([ "", "| Title", ]), }, { 'input_message': {'attac... | null | null | null |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_command_reply.py | train | wee-slack/wee-slack:_pytest/test_command_reply.py | 28 | 4 | assert | test_replying_to_child_should_use_parent_ts | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS, command_reply
parent_ts = SlackTS("1485975824.000004")
child_ts = SlackTS("1485975835.000005")
def test_replying_to_child_should_use_parent_ts(
realish_eventrouter, team, channel_general
):
datafiles = [
... | parent_ts | modified | 67ff12c2792660c57b8d15333be494ed4e2b76ee90a349f075bd5fb214bad7ed | assert|test_replying_to_child_should_use_parent_ts|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS, command_reply parent_ts = SlackTS("1485975824.000004") child_ts = SlackTS("1485975835.000005") def test_replying_to_child_should_use_parent_ts( realish_eventrouter, team,... | parent_ts | 25 | 4 |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_process_message.py | train | wee-slack/wee-slack:_pytest/test_process_message.py | 74 | 4 | assert | test_process_message | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
def test_process_message(realish_eventrouter, team, user_alice):
messages = []
messages.append(
json.loads(
open("_pytest/data/websocket/1485975421.33-message.json", "r").read()
)
... | [deleted_message_ts] | added | c74f085e12fa5dcfc146ba2b133d3bdd7b1239e60a24f88840666158eb810310 | assert|test_process_message|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS def test_process_message(realish_eventrouter, team, user_alice): messages = [] messages.append( json.loads( open("_pytest/data/websocket/1485975421.33-message.json", "r").read() ) ) # test messa... | null | null | null |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_processreply.py | train | wee-slack/wee-slack:_pytest/test_processreply.py | 19 | 4 | assert | test_process_reply | from __future__ import print_function, unicode_literals
from wee_slack import SlackTS
def test_process_reply(realish_eventrouter, team, channel_general):
message_ts = SlackTS("12341234.123456")
message_text = "reply test"
channel_general.send_message(message_text)
team.ws.add(
{"ok": True, "r... | message_text | modified | a38074c868c67ef5038bb38fc3cb3d650053d703e794bed9b7fac20ccac07a03 | assert|test_process_reply|from __future__ import print_function, unicode_literals from wee_slack import SlackTS def test_process_reply(realish_eventrouter, team, channel_general): message_ts = SlackTS("12341234.123456") message_text = "reply test" channel_general.send_message(message_text) team.ws.add( {"ok": True, "re... | message_text | 17 | 4 |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_processsubteamupdated.py | train | wee-slack/wee-slack:_pytest/test_processsubteamupdated.py | 18 | 4 | assert | test_process_subteam_self_updated | from __future__ import print_function, unicode_literals
import json
def test_process_subteam_self_updated(realish_eventrouter, team):
assert len(team.subteams) == 1
datafile = "_pytest/data/websocket/1483975206.59-subteam_updated.json"
data = json.loads(open(datafile, "r").read())
team.ws.add(data)
... | subteam.name | added | 3c9fac4fe9a279cdbf299a322a61b7a43b7b28384efe254c84894db60841b42f | assert|test_process_subteam_self_updated|from __future__ import print_function, unicode_literals import json def test_process_subteam_self_updated(realish_eventrouter, team): assert len(team.subteams) == 1 datafile = "_pytest/data/websocket/1483975206.59-subteam_updated.json" data = json.loads(open(datafile, "r").read(... | null | null | null |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_sendmessage.py | test | wee-slack/wee-slack:_pytest/test_sendmessage.py | 12 | 4 | assert | test_send_message | from __future__ import print_function, unicode_literals
import json
def test_send_message(realish_eventrouter, team, channel_general):
message_text = "send message test"
channel_general.send_message(message_text)
sent = json.loads(team.ws.sentdata[0])
assert sent == | { "text": message_text, "type": "message", "user": team.myidentifier, "channel": channel_general.id, "id": 1, } | added | 31f1405a53d6c537f9bc5f584decae1bfb0468c32fe9fe092f690a4b9d8e0a5b | assert|test_send_message|from __future__ import print_function, unicode_literals import json def test_send_message(realish_eventrouter, team, channel_general): message_text = "send message test" channel_general.send_message(message_text) sent = json.loads(team.ws.sentdata[0]) assert sent == | null | null | null |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_thread.py | val | wee-slack/wee-slack:_pytest/test_thread.py | 28 | 4 | assert | test_message_has_thread_suffix | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
thread_ts = SlackTS("1485975824.000004")
def test_message_has_thread_suffix(realish_eventrouter, team, channel_general):
datafile = "_pytest/data/websocket/1485975824.48-message.json"
data = json.loads(open(d... | "generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 1 ]<[color reset]>" | modified | 504e62b0d038e6773d5af8bce0dc8755632617d14ac2f4555c8b81f2938f85c5 | assert|test_message_has_thread_suffix|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS thread_ts = SlackTS("1485975824.000004") def test_message_has_thread_suffix(realish_eventrouter, team, channel_general): datafile = "_pytest/data/websocket/1485975824.48-message.json" ... | 'generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 1 ]<[color reset]>' | 28 | 4 |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_topic_command.py | train | wee-slack/wee-slack:_pytest/test_topic_command.py | 86 | 8 | assert | test_call_topic_with_unknown_channel | from __future__ import print_function, unicode_literals
import wee_slack
from wee_slack import parse_topic_command, topic_command_cb
from mock import patch
def test_parse_topic_without_arguments():
channel_name, topic = parse_topic_command("/topic")
assert channel_name is None
assert topic is None
def... | wee_slack.w.WEECHAT_RC_OK_EAT | modified | c6ac863d1f19aecc209b60ba007c4d2aa5867a4f0048cd48567604fb4d570dc7 | assert|test_call_topic_with_unknown_channel|from __future__ import print_function, unicode_literals import wee_slack from wee_slack import parse_topic_command, topic_command_cb from mock import patch def test_parse_topic_without_arguments(): channel_name, topic = parse_topic_command("/topic") assert channel_name is Non... | wee_slack.w.WEECHAT_RC_OK_EAT | 85 | 8 |
wee-slack/wee-slack | train | 61 | 373baece5094b5bedf10e08ea95d09be3619fd23 | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 470 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize(
"case",
(
{
"input_message": {
"attachments": [
{
"title": "Title",
}
]
... | case["output"] | added | 6a94ab8b56e3edb40fa04764c67d8a7d29236d5cf85af49bacef2c5cb6c02f51 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize( "case", ( { "input_message": { "attachments": [ { "title": "Title", } ] }, "input_text_before": "Text before", "output": "\n".join( [ "", "| Title", ] ), }, { "input_message": ... | null | null | null |
wee-slack/wee-slack | train | 64 | defd8a0e1a46b786bd3880632477e742a4d6d56c | train | _pytest/test_utf8_helpers.py | train | wee-slack/wee-slack:_pytest/test_utf8_helpers.py | 37 | 8 | assert | test_decode_preserves_unicode_strings | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import sys
from collections import OrderedDict
from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode
b_ae = "æ".encode("utf-8")
b_oe = "ø".encode("utf-8")
b_aa = "å".encode("utf-8")
b_word = b_ae + b_oe + b_aa
if sys.ver... | decode_from_utf8("æøå") | modified | 5044c600f426f7912387ddd6f181df1878b1f0d82fcb140579a4a965d331c6db | assert|test_decode_preserves_unicode_strings|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys from collections import OrderedDict from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode b_ae = "æ".encode("utf-8") b_oe = "ø".encode("utf-8") b_aa = "å".encode("utf-8")... | decode_from_utf8("æøå") | 37 | 8 |
wee-slack/wee-slack | train | 64 | defd8a0e1a46b786bd3880632477e742a4d6d56c | train | _pytest/test_utf8_helpers.py | train | wee-slack/wee-slack:_pytest/test_utf8_helpers.py | 61 | 8 | assert | test_encode_preserves_string_without_utf8 | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import sys
from collections import OrderedDict
from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode
b_ae = "æ".encode("utf-8")
b_oe = "ø".encode("utf-8")
b_aa = "å".encode("utf-8")
b_word = b_ae + b_oe + b_aa
if sys.ver... | encode_to_utf8("test") | modified | 6f827a4a5561de4b7331e866c0a804606796e5501da837f8e5b8db7a4e0ba3fa | assert|test_encode_preserves_string_without_utf8|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys from collections import OrderedDict from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode b_ae = "æ".encode("utf-8") b_oe = "ø".encode("utf-8") b_aa = "å".encode("utf... | encode_to_utf8("test") | 61 | 8 |
wee-slack/wee-slack | train | 64 | defd8a0e1a46b786bd3880632477e742a4d6d56c | train | _pytest/test_utf8_helpers.py | train | wee-slack/wee-slack:_pytest/test_utf8_helpers.py | 64 | 8 | assert | test_encode_preserves_byte_strings | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import sys
from collections import OrderedDict
from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode
b_ae = "æ".encode("utf-8")
b_oe = "ø".encode("utf-8")
b_aa = "å".encode("utf-8")
b_word = b_ae + b_oe + b_aa
if sys.ver... | encode_to_utf8(b_word) | modified | 07fa5aefc83ef811df5e02f3f7aa6530cca8b11a718b630b857b9974811a6221 | assert|test_encode_preserves_byte_strings|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys from collections import OrderedDict from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode b_ae = "æ".encode("utf-8") b_oe = "ø".encode("utf-8") b_aa = "å".encode("utf-8") b_... | encode_to_utf8(b_word) | 64 | 8 |
wee-slack/wee-slack | train | 64 | defd8a0e1a46b786bd3880632477e742a4d6d56c | train | _pytest/test_utf8_helpers.py | train | wee-slack/wee-slack:_pytest/test_utf8_helpers.py | 82 | 8 | assert | test_encodes_utf8_dict_to_unicode | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import sys
from collections import OrderedDict
from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode
b_ae = "æ".encode("utf-8")
b_oe = "ø".encode("utf-8")
b_aa = "å".encode("utf-8")
b_word = b_ae + b_oe + b_aa
if sys.ver... | encode_to_utf8({"æ": "å", "ø": "å"}) | modified | 0784ed046ad7a161e734a210c281cb9558f33a6c8d349eb820b526c4a33f1e73 | assert|test_encodes_utf8_dict_to_unicode|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import sys from collections import OrderedDict from wee_slack import decode_from_utf8, encode_to_utf8, utf8_decode b_ae = "æ".encode("utf-8") b_oe = "ø".encode("utf-8") b_aa = "å".encode("utf-8") b_w... | encode_to_utf8({"æ": "å", "ø": "å"}) | 82 | 8 |
wee-slack/wee-slack | train | 67 | aa1e62619af99181e97ad1201c35e838d53e06df | train | _pytest/test_topic_command.py | train | wee-slack/wee-slack:_pytest/test_topic_command.py | 98 | 4 | assert | test_call_topic_with_channel_and_string | from __future__ import print_function, unicode_literals
import wee_slack
from wee_slack import parse_topic_command, topic_command_cb
from mock import patch
def test_parse_topic_without_arguments():
channel_name, topic = parse_topic_command("/topic")
assert channel_name is None
assert topic is None
def... | { "channel": "C407ABS94", "topic": "new topic", } | modified | 1679cd7fc3b3e8365decbef233f24f79b43ce9c80042ab5d8a3ccb8d3f146571 | assert|test_call_topic_with_channel_and_string|from __future__ import print_function, unicode_literals import wee_slack from wee_slack import parse_topic_command, topic_command_cb from mock import patch def test_parse_topic_without_arguments(): channel_name, topic = parse_topic_command("/topic") assert channel_name is ... | { "channel": "C407ABS94", "token": "xoxs-token", "topic": "new topic", } | 98 | 4 |
wee-slack/wee-slack | train | 67 | aa1e62619af99181e97ad1201c35e838d53e06df | train | _pytest/test_topic_command.py | train | wee-slack/wee-slack:_pytest/test_topic_command.py | 102 | 4 | assert | test_call_topic_with_channel_and_string | from __future__ import print_function, unicode_literals
import wee_slack
from wee_slack import parse_topic_command, topic_command_cb
from mock import patch
def test_parse_topic_without_arguments():
channel_name, topic = parse_topic_command("/topic")
assert channel_name is None
assert topic is None
def... | wee_slack.w.WEECHAT_RC_OK_EAT | modified | 4abc62cea3bbe925849343a75b8a6e7449568c602578f8a46f05e7ba8283cc2a | assert|test_call_topic_with_channel_and_string|from __future__ import print_function, unicode_literals import wee_slack from wee_slack import parse_topic_command, topic_command_cb from mock import patch def test_parse_topic_without_arguments(): channel_name, topic = parse_topic_command("/topic") assert channel_name is ... | wee_slack.w.WEECHAT_RC_OK_EAT | 103 | 4 |
wee-slack/wee-slack | train | 68 | 542155704b737caddf098a7e42f630bfc61a5c2f | train | _pytest/test_helpers.py | train | wee-slack/wee-slack:_pytest/test_helpers.py | 11 | 4 | assert | test_should_url_encode_if_not_encoded | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from wee_slack import url_encode_if_not_encoded
def test_should_url_encode_if_not_encoded():
value = "="
encoded = url_encode_if_not_encoded(value)
assert encoded == | "%3D" | added | 7c7564a51409e27f0101feffd3aee229025ec9bf5fce55c4e412e7f751f6f302 | assert|test_should_url_encode_if_not_encoded|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from wee_slack import url_encode_if_not_encoded def test_should_url_encode_if_not_encoded(): value = "=" encoded = url_encode_if_not_encoded(value) assert encoded == | null | null | null |
wee-slack/wee-slack | train | 68 | 542155704b737caddf098a7e42f630bfc61a5c2f | train | _pytest/test_helpers.py | train | wee-slack/wee-slack:_pytest/test_helpers.py | 17 | 4 | assert | test_should_not_url_encode_if_encoded | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from wee_slack import url_encode_if_not_encoded
def test_should_url_encode_if_not_encoded():
value = "="
encoded = url_encode_if_not_encoded(value)
assert encoded == "%3D"
def test_should_not_url_encode_if_encoded():
v... | value | added | 3a404765ff6ff7c76cc53e1673484d7bb1bfabfdd08ee25a01a97dc719cfaf08 | assert|test_should_not_url_encode_if_encoded|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from wee_slack import url_encode_if_not_encoded def test_should_url_encode_if_not_encoded(): value = "=" encoded = url_encode_if_not_encoded(value) assert encoded == "%3D" def test_should_not_url... | null | null | null |
wee-slack/wee-slack | train | 69 | 3aa2c79d80e17ed1ca02e7698e68218d57bfb47b | train | _pytest/test_http_check_ratelimited.py | train | wee-slack/wee-slack:_pytest/test_http_check_ratelimited.py | 27 | 4 | assert | test_http_check_ratelimited_supports_multiple_headers | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from textwrap import dedent
from wee_slack import SlackRequest
def test_http_check_ratelimited_supports_multiple_headers(realish_eventrouter):
response = (
dedent(
"""
HTTP/1.1 200 Connection establis... | '{"ok": true}' | added | 87f6474afca5de782dcbc6a0e350e0bbaa67a3bc0da60c3004d089133c76820b | assert|test_http_check_ratelimited_supports_multiple_headers|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from textwrap import dedent from wee_slack import SlackRequest def test_http_check_ratelimited_supports_multiple_headers(realish_eventrouter): response = ( dedent( """ HTTP/1.1 20... | null | null | null |
wee-slack/wee-slack | train | 69 | 3aa2c79d80e17ed1ca02e7698e68218d57bfb47b | train | _pytest/test_http_check_ratelimited.py | train | wee-slack/wee-slack:_pytest/test_http_check_ratelimited.py | 49 | 4 | assert | test_http_check_ratelimited_return_error_when_ratelimited | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from textwrap import dedent
from wee_slack import SlackRequest
def test_http_check_ratelimited_supports_multiple_headers(realish_eventrouter):
response = (
dedent(
"""
HTTP/1.1 200 Connection establis... | "ratelimited" | added | 4cc5fceb48a1fed598d44aa199e021c3daf336ef682fe3130be814153d40e5b1 | assert|test_http_check_ratelimited_return_error_when_ratelimited|# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from textwrap import dedent from wee_slack import SlackRequest def test_http_check_ratelimited_supports_multiple_headers(realish_eventrouter): response = ( dedent( """ HTTP/1.... | null | null | null |
wee-slack/wee-slack | train | 70 | 51f124228b0d308719dd0d9b111b53235748bc67 | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 470 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize(
"case",
(
{
"input_message": {
"attachments": [
{
"title": "Title",
}
]
... | case["output"] | modified | ea5561a35c26483b34bbc8c6b4bc0ab365c7c23e649c25bed0aa1d461cbd8ad1 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize( "case", ( { "input_message": { "attachments": [ { "title": "Title", } ] }, "input_text_before": "Text before", "output": "\n".join( [ "", "| Title", ] ), }, { "input_message": ... | case["output"] | 470 | 4 |
wee-slack/wee-slack | train | 71 | 74da30342e8d328fc085d2158e37afda3b908f2c | train | _pytest/test_render_blocks.py | train | wee-slack/wee-slack:_pytest/test_render_blocks.py | 247 | 4 | assert | test_render_blocks | from __future__ import print_function, unicode_literals
import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"blocks": [
{
"type": "rich_text",
"block_id": "dhGA",
"elements": [
... | case["rendered"] | added | 381485d388f6c392442e92fe1a9871e38be72129ca4dcfb057cf000c35f0dfe8 | assert|test_render_blocks|from __future__ import print_function, unicode_literals import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "blocks": [ { "type": "rich_text", "block_id": "dhGA", "elements": [ { "type": "rich_text_section", "elements": [ {"type": "text", "text": "normal "}, { "type": "text", ... | null | null | null |
wee-slack/wee-slack | train | 72 | 2ee278623b2f7a1fac8a6908999cb8e33a1be13f | train | _pytest/test_render_blocks.py | train | wee-slack/wee-slack:_pytest/test_render_blocks.py | 250 | 4 | assert | test_render_blocks | from __future__ import print_function, unicode_literals
import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"blocks": [
{
"type": "rich_text",
"block_id": "dhGA",
"elements": [
... | case["rendered"] | modified | a31e691d7eec03460b7e40bec419d321ee2bc041c14e4bf9d2f8f80c070cf07f | assert|test_render_blocks|from __future__ import print_function, unicode_literals import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "blocks": [ { "type": "rich_text", "block_id": "dhGA", "elements": [ { "type": "rich_text_section", "elements": [ {"type": "text", "text": "normal "}, { "type": "text", ... | case["rendered"] | 247 | 4 |
wee-slack/wee-slack | train | 73 | b4ba7da53bcc79e3b20131abeefd8260686a03e2 | train | _pytest/test_process_message.py | train | wee-slack/wee-slack:_pytest/test_process_message.py | 76 | 4 | assert | test_process_message | from __future__ import print_function, unicode_literals
import json
from wee_slack import SlackTS
def test_process_message(realish_eventrouter, team, user_alice):
messages = []
messages.append(
json.loads(
open("_pytest/data/websocket/1485975421.33-message.json", "r").read()
)
... | deleted_str | modified | e0674f711130982bae9255215fc74033aa92978be3430de6a692f00c273f107f | assert|test_process_message|from __future__ import print_function, unicode_literals import json from wee_slack import SlackTS def test_process_message(realish_eventrouter, team, user_alice): messages = [] messages.append( json.loads( open("_pytest/data/websocket/1485975421.33-message.json", "r").read() ) ) # test messa... | deleted_str | 76 | 4 |
wee-slack/wee-slack | train | 74 | 2d55e8e4d252f21026431e05f234f10fd14091ec | train | _pytest/test_render_blocks.py | train | wee-slack/wee-slack:_pytest/test_render_blocks.py | 359 | 4 | assert | test_render_blocks | from __future__ import print_function, unicode_literals
import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"blocks": [
{
"type": "rich_text",
"block_id": "dhGA",
"elements": [
... | case["rendered"] | added | 44b695eecc8ad7abcaa08fa90990219505c570a53965db5368716ceecd7ec372 | assert|test_render_blocks|from __future__ import print_function, unicode_literals import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "blocks": [ { "type": "rich_text", "block_id": "dhGA", "elements": [ { "type": "rich_text_section", "elements": [ {"type": "text", "text": "normal "}, { "type": "text", ... | null | null | null |
wee-slack/wee-slack | train | 75 | 2050552f6aed3525e2c32e70b40c7ba64c6eb103 | train | _pytest/test_render_message.py | train | wee-slack/wee-slack:_pytest/test_render_message.py | 100 | 4 | assert | test_render_message | import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"input_message": {
"blocks": [
{
"type": "rich_text",
"block_id": "5Cg6",
"elements": [
... | case["rendered"] | added | 86eab3ddd5929ec258419b938a0784ba7d4b7c9b408c15f419d7d3fc289d7fec | assert|test_render_message|import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "input_message": { "blocks": [ { "type": "rich_text", "block_id": "5Cg6", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "emoji", "name": "smile", "unicode": "1f604", } ], }, ], }, ], "reactions": [{"na... | null | null | null |
wee-slack/wee-slack | train | 76 | 2e5fdd068ad0ab0843be714bc7ac52316514103e | train | _pytest/test_render_message.py | train | wee-slack/wee-slack:_pytest/test_render_message.py | 150 | 4 | assert | test_render_message | import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"input_message": {
"blocks": [
{
"type": "rich_text",
"block_id": "5Cg6",
"elements": [
... | case["rendered"] | added | efc2191f30607ee1fdd0d29b653d362c28990d08bff03e2d41e683b8d84750ba | assert|test_render_message|import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "input_message": { "blocks": [ { "type": "rich_text", "block_id": "5Cg6", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "emoji", "name": "smile", "unicode": "1f604", } ], }, ], }, ], "reactions": [{"na... | null | null | null |
wee-slack/wee-slack | train | 76 | 2e5fdd068ad0ab0843be714bc7ac52316514103e | train | _pytest/test_unwrap_attachments.py | test | wee-slack/wee-slack:_pytest/test_unwrap_attachments.py | 552 | 4 | assert | test_unwrap_attachments | from __future__ import print_function, unicode_literals
import wee_slack
import pytest
@pytest.mark.parametrize(
"case",
(
{
"input_message": {
"attachments": [
{
"title": "Title",
}
]
... | case["output"] | added | 8ea9cb191deec42fc4d220a37811956c1cea9bc64d257b9f6efc65e7c40d3e14 | assert|test_unwrap_attachments|from __future__ import print_function, unicode_literals import wee_slack import pytest @pytest.mark.parametrize( "case", ( { "input_message": { "attachments": [ { "title": "Title", } ] }, "input_text_before": "Text before", "output": "\n".join( [ "", "| Title", ] ), }, { "input_message": ... | null | null | null |
wee-slack/wee-slack | train | 77 | cf244bb2b9571b64bdd9b9e9ec3ac4e74a213190 | train | _pytest/test_render_blocks.py | train | wee-slack/wee-slack:_pytest/test_render_blocks.py | 374 | 4 | assert | test_render_blocks | from __future__ import print_function, unicode_literals
import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"blocks": [
{
"type": "rich_text",
"block_id": "dhGA",
"elements": [
... | case["rendered"] | added | 1462bdcc7a36b696da18dafeccf5af13b23665b0fb508d11e08afd6c91faad97 | assert|test_render_blocks|from __future__ import print_function, unicode_literals import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "blocks": [ { "type": "rich_text", "block_id": "dhGA", "elements": [ { "type": "rich_text_section", "elements": [ {"type": "text", "text": "normal "}, { "type": "text", ... | null | null | null |
wee-slack/wee-slack | train | 78 | 6b388cd9aea6b091e16bdd22d0a28d9f1931b284 | train | _pytest/test_render_message.py | train | wee-slack/wee-slack:_pytest/test_render_message.py | 174 | 4 | assert | test_render_message | import pytest
import wee_slack
@pytest.mark.parametrize(
"case",
[
{
"input_message": {
"blocks": [
{
"type": "rich_text",
"block_id": "5Cg6",
"elements": [
... | case["rendered"] | added | 37a0bf96fa426019fc4f8744f75aa11cf07f2ab4ba1c003afa463a88a9a26c8f | assert|test_render_message|import pytest import wee_slack @pytest.mark.parametrize( "case", [ { "input_message": { "blocks": [ { "type": "rich_text", "block_id": "5Cg6", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "emoji", "name": "smile", "unicode": "1f604", } ], }, ], }, ], "reactions": [{"na... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 22 | 4 | assert | test_hook_process_hashtable | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import (
FutureProcess,
FutureTimer,
hook_process_hashtable,
weechat_task_cb,
)
import slack
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_hashtable(mock_method: MagicMock):
command = "com... | isinstance(future, FutureProcess) | added | eb5cac83d3473452d50f038d74d347a8e89004c8ed3f25172b8cb51e8ac98206 | assert|test_hook_process_hashtable|from unittest.mock import MagicMock, patch import pytest import weechat from slack import ( FutureProcess, FutureTimer, hook_process_hashtable, weechat_task_cb, ) import slack @patch.object(weechat, "hook_process_hashtable") def test_hook_process_hashtable(mock_method: MagicMock): com... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 40 | 4 | assert | test_hook_process_hashtable_chunked | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import (
FutureProcess,
FutureTimer,
hook_process_hashtable,
weechat_task_cb,
)
import slack
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_hashtable(mock_method: MagicMock):
command = "com... | isinstance(future, FutureProcess) | added | c8fa0de86c3cdc267b5f1ef89ec4b68d36c753195facfe5dba8aeafe95205eb1 | assert|test_hook_process_hashtable_chunked|from unittest.mock import MagicMock, patch import pytest import weechat from slack import ( FutureProcess, FutureTimer, hook_process_hashtable, weechat_task_cb, ) import slack @patch.object(weechat, "hook_process_hashtable") def test_hook_process_hashtable(mock_method: MagicMo... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 65 | 4 | assert | test_http_request_error_process_stderr | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import (
FutureProcess,
FutureTimer,
HttpError,
http_request,
weechat_task_cb,
)
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock):
url = "http://example.co... | "err" | added | 8c1250788c369daee5b80db16ac7c3fc62068ed640c3e4d2556479432ce85716 | assert|test_http_request_error_process_stderr|from unittest.mock import MagicMock, patch import pytest import weechat from slack import ( FutureProcess, FutureTimer, HttpError, http_request, weechat_task_cb, ) @patch.object(weechat, "hook_process_hashtable") def test_http_request_success(mock_method: MagicMock): url = ... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 107 | 4 | assert | test_http_request_error_retry_error | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import (
FutureProcess,
FutureTimer,
HttpError,
http_request,
weechat_task_cb,
)
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock):
url = "http://example.co... | isinstance(coroutine.send((0,)), FutureProcess) | added | cfb84e990c7bad802a79e22a6018f8aaa23e04720c7c2354d7f2c47f0368b166 | assert|test_http_request_error_retry_error|from unittest.mock import MagicMock, patch import pytest import weechat from slack import ( FutureProcess, FutureTimer, HttpError, http_request, weechat_task_cb, ) @patch.object(weechat, "hook_process_hashtable") def test_http_request_success(mock_method: MagicMock): url = "ht... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 14 | 4 | assert | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import FutureTimer, sleep, weechat_task_cb
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
future = coroutine.send(None)
assert | isinstance(future, FutureTimer) | added | fe6b55dc64f996c76694449f62c21e4710f7e7a898d8eb00e7b1e4d31137f4a8 | assert|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack import FutureTimer, sleep, weechat_task_cb @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) future = coroutine.send(None) assert | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 20 | 9 | pytest.raises | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack import FutureTimer, sleep, weechat_task_cb
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
future = coroutine.send(None)
assert isinstanc... | StopIteration) | added | 84782a75a48853f8296315ea50e10e6bcb4bb5a5c6f0fa79ee952f0f96ad46e8 | pytest.raises|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack import FutureTimer, sleep, weechat_task_cb @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) future = coroutine.send(None) assert isin... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 17 | 4 | assert | test_run_single_task | import slack
from slack import Future, create_task, weechat_task_cb
def test_run_single_task():
slack.active_tasks = {}
slack.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future
return "awaitable", result
task = create_task(awaitable())
w... | not slack.active_tasks | added | 6974d6f0256221bd17e160cfa0458a18ad0bad2c244b87b4d8351c2cd74bab3c | assert|test_run_single_task|import slack from slack import Future, create_task, weechat_task_cb def test_run_single_task(): slack.active_tasks = {} slack.active_responses = {} future = Future[str]() async def awaitable(): result = await future return "awaitable", result task = create_task(awaitable()) weechat_task_cb(f... | null | null | null |
wee-slack/wee-slack | train | 79 | 7c919da30d2209f84c070e9b7e4540d7cde531d4 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 38 | 4 | assert | test_run_nested_task | import slack
from slack import Future, create_task, weechat_task_cb
def test_run_single_task():
slack.active_tasks = {}
slack.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future
return "awaitable", result
task = create_task(awaitable())
w... | { task.id: ("awaitable2", ("awaitable1", ("data",))) } | added | d74430977ec09c895e0f56c09fda9eed1c4deb817096a3695342d731301e11a0 | assert|test_run_nested_task|import slack from slack import Future, create_task, weechat_task_cb def test_run_single_task(): slack.active_tasks = {} slack.active_responses = {} future = Future[str]() async def awaitable(): result = await future return "awaitable", result task = create_task(awaitable()) weechat_task_cb(f... | null | null | null |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 47 | 4 | assert | test_hook_process_hashtable_chunked | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_hashtable(mock_method: MagicMock):
com... | (command, 0, "o1o2o3", "e1e2e3") | added | 3be2bbaec8ab10b030fde5ffe00281e84aba5aa59b41d421f8137d0215279ee8 | assert|test_hook_process_hashtable_chunked|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_hook_process_has... | null | null | null |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 60 | 4 | assert | test_hook_process_hashtable_wait_on_max_file_descriptors | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_hashtable(mock_method: MagicMock):
com... | isinstance(coroutine.send((0,)), FutureTimer) | modified | e533fab07bf7962918a6dd7887ddbacced58cf6e9ff782d5c1855fef0d1e651f | assert|test_hook_process_hashtable_wait_on_max_file_descriptors|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def ... | isinstance(future, FutureTimer) | 61 | 4 |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 38 | 4 | assert | test_http_request_error_process_return_code | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock):
url = "http://example.... | isinstance(coroutine.send(None), FutureProcess) | added | 6103914942345981062623b115158a0a3f47309ce1a9e27c3cd8261778ade763 | assert|test_http_request_error_process_return_code|from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http_request_success(mock... | null | null | null |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 130 | 9 | pytest.raises | test_http_request_ratelimit | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock):
url = "http://example.... | StopIteration) | added | 46e0783c17dabd83d8a56c4bf4aa9484054a4cac82e9b522462ab401568920e5 | pytest.raises|test_http_request_ratelimit|from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http_request_success(mock_method: ... | null | null | null |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 14 | 4 | assert | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.task import FutureTimer, sleep, weechat_task_cb
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
future = coroutine.send(None)
assert | isinstance(future, FutureTimer) | modified | 44abb4d1623ea3c7faba674fad7abaa46a6879d9651e2519bce223f711e45229 | assert|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) future = coroutine.send(None) assert | isinstance(future, FutureTimer) | 14 | 4 |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 16 | 4 | assert_* | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.task import FutureTimer, sleep, weechat_task_cb
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
future = coroutine.send(None)
assert isin... | future.id) | modified | cfd09d53fe736cbaaa5851e75e7e32f314e3629e6d55b9f84e3dcbeba78dcc04 | assert_*|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) future = coroutine.send(None) assert isin... | future.id) | 16 | 4 |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 17 | 4 | assert | test_run_single_task | from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = {}
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future
return "awaitable", result
task = crea... | not shared.active_tasks | modified | 7888c4d077d8b2fa3620b3514760a0a4fabbe95ba6947367d71017d0e89c53a6 | assert|test_run_single_task|from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = {} shared.active_responses = {} future = Future[str]() async def awaitable(): result = await future return "awaitable", result task = create_task(awai... | not slack.active_tasks | 17 | 4 |
wee-slack/wee-slack | train | 80 | 8257efd22ea2ac9088098c161dc554d82bbdd974 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 37 | 4 | assert | test_run_nested_task | from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = {}
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future
return "awaitable", result
task = crea... | not shared.active_tasks | modified | fb8a4b412b7ef004185b530f9364abbc3a239557348cbeb5fb2d9d622057d031 | assert|test_run_nested_task|from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = {} shared.active_responses = {} future = Future[str]() async def awaitable(): result = await future return "awaitable", result task = create_task(awai... | not slack.active_tasks | 37 | 4 |
wee-slack/wee-slack | train | 81 | 1358241a612980781bc7f80dec67bc8de74a3903 | train | tests/test_commands.py | test | wee-slack/wee-slack:tests/test_commands.py | 13 | 12 | assert | test_all_parent_commands_exist | # Test parsing options
# Test calling the correct function
from itertools import accumulate
import slack.commands
def test_all_parent_commands_exist():
for command in slack.commands.commands:
parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
for parent in parents:
ass... | slack.commands.commands | added | e8d4ff424007a452f254b1db4bc9946685dea797b142a371df280197ebefbc56 | assert|test_all_parent_commands_exist|# Test parsing options # Test calling the correct function from itertools import accumulate import slack.commands def test_all_parent_commands_exist(): for command in slack.commands.commands: parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}") for parent in parents: a... | null | null | null |
wee-slack/wee-slack | train | 82 | 734e76aea266632643f4c5df49b8ab34ffc403d0 | train | tests/test_commands.py | test | wee-slack/wee-slack:tests/test_commands.py | 13 | 12 | assert | test_all_parent_commands_exist | # Test calling the correct function
from itertools import accumulate
import slack.commands
from slack.commands import parse_options
def test_all_parent_commands_exist():
for command in slack.commands.commands:
parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
for parent in parent... | slack.commands.commands | added | cd8ebb665e212f4dd0f4e72c1718998b7c2b02f092b118d37a8f3caea4ab6fd3 | assert|test_all_parent_commands_exist|# Test calling the correct function from itertools import accumulate import slack.commands from slack.commands import parse_options def test_all_parent_commands_exist(): for command in slack.commands.commands: parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}") for pa... | null | null | null |
wee-slack/wee-slack | train | 82 | 734e76aea266632643f4c5df49b8ab34ffc403d0 | train | tests/test_commands.py | test | wee-slack/wee-slack:tests/test_commands.py | 18 | 4 | assert | test_parse_options_without_options | # Test calling the correct function
from itertools import accumulate
import slack.commands
from slack.commands import parse_options
def test_all_parent_commands_exist():
for command in slack.commands.commands:
parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
for parent in parent... | "workspace add wee-slack-test" | added | 1fd2f0a28868f94e6f1791d492187a176f32cb96b10221dca6032b6e106f2d8b | assert|test_parse_options_without_options|# Test calling the correct function from itertools import accumulate import slack.commands from slack.commands import parse_options def test_all_parent_commands_exist(): for command in slack.commands.commands: parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}") fo... | null | null | null |
wee-slack/wee-slack | train | 82 | 734e76aea266632643f4c5df49b8ab34ffc403d0 | train | tests/test_commands.py | test | wee-slack/wee-slack:tests/test_commands.py | 31 | 4 | assert | test_parse_options_option_in_middle | # Test calling the correct function
from itertools import accumulate
import slack.commands
from slack.commands import parse_options
def test_all_parent_commands_exist():
for command in slack.commands.commands:
parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
for parent in parent... | {"autoconnect": None} | added | 7d558573e72430a5cd47ed317475a3d4596ff49d7adce838b2635196898542d0 | assert|test_parse_options_option_in_middle|# Test calling the correct function from itertools import accumulate import slack.commands from slack.commands import parse_options def test_all_parent_commands_exist(): for command in slack.commands.commands: parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}") f... | null | null | null |
wee-slack/wee-slack | train | 82 | 734e76aea266632643f4c5df49b8ab34ffc403d0 | train | tests/test_commands.py | test | wee-slack/wee-slack:tests/test_commands.py | 39 | 4 | assert | test_parse_options_option_with_value | # Test calling the correct function
from itertools import accumulate
import slack.commands
from slack.commands import parse_options
def test_all_parent_commands_exist():
for command in slack.commands.commands:
parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
for parent in parent... | {"autoconnect": None, "api_token": "xoxp-1"} | added | ef386ddf73a84938381aea5c782d174584d9bd92c6e9c1840b8db418573aacd3 | assert|test_parse_options_option_with_value|# Test calling the correct function from itertools import accumulate import slack.commands from slack.commands import parse_options def test_all_parent_commands_exist(): for command in slack.commands.commands: parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}") ... | null | null | null |
wee-slack/wee-slack | train | 83 | adf20323ce99e8829a2ab53f8d487f5704d28320 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 19 | 4 | assert | test_run_single_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future... | not shared.active_tasks | added | 5d42cba5058696f2ed2299678e289322f258c534302614041d65f8fae326f26f | assert|test_run_single_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_responses = {} future = Future[str]() async def awaitable(): result = await future... | null | null | null |
wee-slack/wee-slack | train | 83 | adf20323ce99e8829a2ab53f8d487f5704d28320 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 20 | 4 | assert | test_run_single_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future... | {task.id: ("awaitable", ("data",))} | added | 17e10095ca1f998944414678a015bbac1b24c70389e509c42a523144540f7d01 | assert|test_run_single_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_responses = {} future = Future[str]() async def awaitable(): result = await future... | null | null | null |
wee-slack/wee-slack | train | 83 | adf20323ce99e8829a2ab53f8d487f5704d28320 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 39 | 4 | assert | test_run_nested_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future... | not shared.active_tasks | added | f0276f22307a1e1b80e4f70587a37b9120e29cfcefd926a96d03e9fa78cfdb82 | assert|test_run_nested_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_responses = {} future = Future[str]() async def awaitable(): result = await future... | null | null | null |
wee-slack/wee-slack | train | 83 | adf20323ce99e8829a2ab53f8d487f5704d28320 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 61 | 4 | assert | test_run_two_tasks_concurrently | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_responses = {}
future = Future[str]()
async def awaitable():
result = await future... | { task1.id: ("awaitable", ("data1",)), task2.id: ("awaitable", ("data2",)), } | added | 19890f2aeba912a717c0821243682abf5c55cba03107bbd212e5601761035d27 | assert|test_run_two_tasks_concurrently|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_responses = {} future = Future[str]() async def awaitable(): result = a... | null | null | null |
wee-slack/wee-slack | train | 84 | 81e98c8b7049fd08886ba7099bba02130b6026a2 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 19 | 4 | assert | test_run_single_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_tasks | modified | 9691e74d46a61ac50e4f51208ccd39f2439473ade1f318d7b13730972e10661a | assert|test_run_single_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await future r... | not shared.active_tasks | 19 | 4 |
wee-slack/wee-slack | train | 84 | 81e98c8b7049fd08886ba7099bba02130b6026a2 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 21 | 4 | assert | test_run_single_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | ("awaitable", ("data",)) | added | b186ebb52f6390df6568f8a6d0a1c61fd718c58b96a07991324d04dcf72cd008 | assert|test_run_single_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await future r... | null | null | null |
wee-slack/wee-slack | train | 84 | 81e98c8b7049fd08886ba7099bba02130b6026a2 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 41 | 4 | assert | test_run_nested_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_futures | added | 70a02f90130a43c05d747c4dac2256a04187f2f7924be2025443c6a714c491ba | assert|test_run_nested_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await future r... | null | null | null |
wee-slack/wee-slack | train | 84 | 81e98c8b7049fd08886ba7099bba02130b6026a2 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 63 | 4 | assert | test_run_two_tasks_concurrently | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | ("awaitable", ("data2",)) | added | a5e3255dcd8c7b5095ba0ebd7e31510dfef8a211efe85956ba1f3c9b02b81607 | assert|test_run_two_tasks_concurrently|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = awa... | null | null | null |
wee-slack/wee-slack | train | 85 | 5e777696447f1895d67625c913398795308de31f | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 20 | 4 | assert_* | test_http_request_success | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock)... | future.id) | modified | 8e08070219911abc90458744a14935033025664aac34fbb3879de9f23812817a | assert_*|test_http_request_success|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http_request_... | future.id) | 19 | 4 |
wee-slack/wee-slack | train | 85 | 5e777696447f1895d67625c913398795308de31f | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 67 | 4 | assert | test_http_request_error_process_http | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock)... | isinstance(coroutine.send(None), FutureProcess) | modified | a6978def9981440b3999ecb3795d69e477a6ca95fee54772b162f0ae89c66a9b | assert|test_http_request_error_process_http|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http... | isinstance(coroutine.send(None), FutureProcess) | 66 | 4 |
wee-slack/wee-slack | train | 85 | 5e777696447f1895d67625c913398795308de31f | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 104 | 4 | assert | test_http_request_error_retry_error | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock)... | isinstance(coroutine.send(("", -2, "", "")), FutureTimer) | modified | 918749189f57637b6d5c66b06e065c9faed191391456a8b1f2f4fd52a62ac03f | assert|test_http_request_error_retry_error|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http_... | isinstance(coroutine.send(("", -2, "", "")), FutureTimer) | 103 | 4 |
wee-slack/wee-slack | train | 85 | 5e777696447f1895d67625c913398795308de31f | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 147 | 4 | assert | test_http_request_ratelimit | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
@patch.object(weechat, "hook_process_hashtable")
def test_http_request_success(mock_method: MagicMock)... | isinstance(coroutine.send(None), FutureProcess) | added | a97a14937bb0d54fcdbaeb549694e57e6e17a4b145b907a493a47cee04146425 | assert|test_http_request_ratelimit|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb @patch.object(weechat, "hook_process_hashtable") def test_http_request_... | null | null | null |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 27 | 4 | assert | test_hook_process_hashtable | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | (command, 0, "out", "err") | modified | 8d2f109c7f64793b55f2330821658c130a2f58b4f2bcf935238f310195d96e38 | assert|test_hook_process_hashtable|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_process_hash... | (command, 0, "out", "err") | 26 | 4 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 46 | 9 | pytest.raises | test_hook_process_hashtable_chunked | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | StopIteration) | modified | b324d5a5e410c39639c51df3bfb1bd160f8cd81cc2b227d28640b4ae1209d7e8 | pytest.raises|test_hook_process_hashtable_chunked|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "ho... | StopIteration) | 45 | 9 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 64 | 4 | assert | test_hook_process_hashtable_wait_on_max_file_descriptors | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | isinstance(coroutine.send((0,)), FutureProcess) | modified | c6c294baccf76a2b4982c0113b02c9164b3021ccc7489d4ca54a150bd8dfc103 | assert|test_hook_process_hashtable_wait_on_max_file_descriptors|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.objec... | isinstance(coroutine.send((0,)), FutureProcess) | 63 | 4 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 73 | 9 | pytest.raises | test_http_request_error_process_http | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | HttpError) | modified | 03ff4edcebbc488d37b105e0f6c2746a8273d8ec7d54b2d7eb7bacf9f4271ccc | pytest.raises|test_http_request_error_process_http|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(... | HttpError) | 72 | 9 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 95 | 4 | assert | test_http_request_error_retry_success | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | response | modified | a0b1130a3ad64d3fb0225c29802478bebaae785cfd04871dfc31812b7262e634 | assert|test_http_request_error_retry_success|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weecha... | response | 94 | 4 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 121 | 4 | assert | test_http_request_multiple_headers | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | isinstance(future, FutureProcess) | modified | 9b7715df43b765949a98bd20f11f66af5a23289eeba698b81e4264410ca211f5 | assert|test_http_request_multiple_headers|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, ... | isinstance(future, FutureProcess) | 120 | 4 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 15 | 4 | assert | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.task import FutureTimer, sleep, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
futu... | isinstance(future, FutureTimer) | modified | 5b5aca6935633e6f36af1da5533c3204377c0ffcb66fac9be5275206cc77f785 | assert|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) fu... | isinstance(future, FutureTimer) | 14 | 4 |
wee-slack/wee-slack | train | 86 | 74c3a674d30d957f90480a8115224e13dfb7d41d | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 21 | 9 | pytest.raises | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.task import FutureTimer, sleep, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
futu... | StopIteration) | added | 0214a69b2abaf123050f973785ccda7fabf3ad3c105db42a9a7087102ef924c0 | pytest.raises|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseco... | null | null | null |
wee-slack/wee-slack | train | 87 | 432d7ffdaf701df556a6d4e45b8e0b75bd887597 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 78 | 4 | assert | test_task_without_await | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_tasks | added | 7f0eb20f4cc5a2df25b042260bfd9cdb2c71eaeed6209888c887f1c30273f145 | assert|test_task_without_await|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await futur... | null | null | null |
wee-slack/wee-slack | train | 87 | 432d7ffdaf701df556a6d4e45b8e0b75bd887597 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 79 | 4 | assert | test_task_without_await | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_futures | added | 57204e81bb830f2d186be1a0e65ac998f955c5ae0d44c1cb1ada05fd96f9006c | assert|test_task_without_await|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await futur... | null | null | null |
wee-slack/wee-slack | train | 88 | d6b4f505d53e69ecb39d518a89d8d0013e22ad51 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 56 | 9 | pytest.raises | test_http_request_error_process_stderr | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | HttpError) | modified | 83825f0a9c198b1ffdbe7e834f9fdc50872a3bae5c1c5ba8f5c61f3abfec1443 | pytest.raises|test_http_request_error_process_stderr|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.objec... | HttpError) | 56 | 9 |
wee-slack/wee-slack | train | 88 | d6b4f505d53e69ecb39d518a89d8d0013e22ad51 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 68 | 4 | assert | test_http_request_error_process_http | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | isinstance(coroutine.send(None), FutureProcess) | modified | e8298c0b15295d94d700277fbcef4c299ae3d64c7bd25bccb9f8039d4ad4afed | assert|test_http_request_error_process_http|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat... | isinstance(coroutine.send(None), FutureProcess) | 68 | 4 |
wee-slack/wee-slack | train | 88 | d6b4f505d53e69ecb39d518a89d8d0013e22ad51 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 104 | 4 | assert | test_http_request_error_retry_error | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | isinstance(coroutine.send((0,)), FutureProcess) | modified | 83911b40323a27a02201283cbc82ab908722294f102c4d8745051f12fd9848a8 | assert|test_http_request_error_retry_error|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat,... | isinstance(coroutine.send((0,)), FutureProcess) | 104 | 4 |
wee-slack/wee-slack | train | 88 | d6b4f505d53e69ecb39d518a89d8d0013e22ad51 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 148 | 4 | assert | test_http_request_ratelimit | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | isinstance(coroutine.send(None), FutureProcess) | modified | 20ade3d578676fbd2722928267c67d02349d6b27a76552a77869f493a0bfa850 | assert|test_http_request_ratelimit|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_p... | isinstance(coroutine.send(None), FutureProcess) | 148 | 4 |
wee-slack/wee-slack | train | 89 | fb7bc866464427f402d4855e200d84a32eba59e9 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 21 | 4 | assert | test_run_single_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | ("awaitable", ("data",)) | modified | 3ab530c8c81437903d9d313ee9b99a9fad4ac5358ca48970bca0b5ddcd2e3ce5 | assert|test_run_single_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await future r... | ("awaitable", ("data",)) | 21 | 4 |
wee-slack/wee-slack | train | 89 | fb7bc866464427f402d4855e200d84a32eba59e9 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 40 | 4 | assert | test_run_nested_task | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_tasks | modified | c45b8ee3d6084cd6db1c352e00c71d01c2fe42269678a176903e7695f42b2ba6 | assert|test_run_nested_task|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await future r... | not shared.active_tasks | 40 | 4 |
wee-slack/wee-slack | train | 89 | fb7bc866464427f402d4855e200d84a32eba59e9 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 60 | 4 | assert | test_run_two_tasks_concurrently | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_tasks | modified | cadba3d8d2d37fa797fbb92de3ea2eebe94973646a14da94b7e38602720f2f67 | assert|test_run_two_tasks_concurrently|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = awa... | not shared.active_tasks | 60 | 4 |
wee-slack/wee-slack | train | 89 | fb7bc866464427f402d4855e200d84a32eba59e9 | train | tests/test_task_runner.py | train | wee-slack/wee-slack:tests/test_task_runner.py | 78 | 4 | assert | test_task_without_await | from collections import defaultdict
from slack.shared import shared
from slack.task import Future, create_task, weechat_task_cb
def test_run_single_task():
shared.active_tasks = defaultdict(list)
shared.active_futures = {}
future = Future[str]()
async def awaitable():
result = await future
... | not shared.active_tasks | modified | 9c55a863851a6f7396772e277e9d3e96ebf4912bed33ebe35fa9cff4a7f324e9 | assert|test_task_without_await|from collections import defaultdict from slack.shared import shared from slack.task import Future, create_task, weechat_task_cb def test_run_single_task(): shared.active_tasks = defaultdict(list) shared.active_futures = {} future = Future[str]() async def awaitable(): result = await futur... | not shared.active_tasks | 78 | 4 |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 28 | 4 | assert | test_hook_process_hashtable | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | (command, 0, "out", "err") | modified | eefcaf0c00345371d573b268ffae6ffc948ecbf5d0c101d45acfeec51a7a5759 | assert|test_hook_process_hashtable|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_process_hash... | (command, 0, "out", "err") | 27 | 4 |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 38 | 4 | assert | test_hook_process_hashtable_chunked | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | isinstance(future_1, FutureProcess) | modified | bfec830485e878c6c4d0c197f5b26c6d32d4b2a4ade836428ebd54f6036966a6 | assert|test_hook_process_hashtable_chunked|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_proc... | isinstance(future, FutureProcess) | 37 | 4 |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_hook_process_hashtable.py | train | wee-slack/wee-slack:tests/test_hook_process_hashtable.py | 74 | 4 | assert | test_hook_process_hashtable_wait_on_max_file_descriptors | from unittest.mock import MagicMock, patch
import pytest
import weechat
import slack.http
from slack.http import hook_process_hashtable
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_hook_process_h... | isinstance(coroutine.send(None), FutureProcess) | added | c7dd7a289591e69a5a12b9988b91bd23d58cd9a3a2b3ecba04c75967fc9dcbad | assert|test_hook_process_hashtable_wait_on_max_file_descriptors|from unittest.mock import MagicMock, patch import pytest import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.objec... | null | null | null |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 34 | 9 | pytest.raises | test_http_request_success | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | StopIteration) | modified | ba0a3aaf7cb60b5918eb70057b1048d1821866967a322bd8d411dd5d03169393 | pytest.raises|test_http_request_success|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "h... | StopIteration) | 32 | 9 |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 114 | 4 | assert | test_http_request_error_retry_success | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | response | added | c9412a99a7819777ee0fc03a020277e4bd1c5d20caf7f498497d091f53dd19ab | assert|test_http_request_error_retry_success|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weecha... | null | null | null |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_http_request.py | val | wee-slack/wee-slack:tests/test_http_request.py | 190 | 4 | assert | test_http_request_ratelimit | from textwrap import dedent
from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.http import HttpError, http_request
from slack.task import FutureProcess, FutureTimer, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_process_hashtable")
def test_htt... | isinstance(future_2, FutureTimer) | added | bd5e71817cb64d301c5f345f6114c3670d8000aeda8c437aefb181a2826d6dbe | assert|test_http_request_ratelimit|from textwrap import dedent from unittest.mock import MagicMock, patch import pytest import weechat from slack.http import HttpError, http_request from slack.task import FutureProcess, FutureTimer, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_p... | null | null | null |
wee-slack/wee-slack | train | 90 | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 | train | tests/test_sleep.py | train | wee-slack/wee-slack:tests/test_sleep.py | 18 | 4 | assert_* | test_sleep | from unittest.mock import MagicMock, patch
import pytest
import weechat
from slack.task import FutureTimer, sleep, weechat_task_cb
from slack.util import get_callback_name
@patch.object(weechat, "hook_timer")
def test_sleep(mock_method: MagicMock):
milliseconds = 123
coroutine = sleep(milliseconds)
futu... | future.id) | modified | b8b773804f6374dd10e3c354a0fd97cd0e2d867739eec2a828c658bb7007e2f8 | assert_*|test_sleep|from unittest.mock import MagicMock, patch import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb from slack.util import get_callback_name @patch.object(weechat, "hook_timer") def test_sleep(mock_method: MagicMock): milliseconds = 123 coroutine = sleep(milliseconds) ... | future.id) | 17 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.