repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_search_engine.py | test_result_field_fallbacks | self.assertEqual | string_literal | 34 | import unittest
from unittest.mock import patch, MagicMock
import sys
from io import StringIO
from tools.search_engine import search
class TestSearchEngine(unittest.TestCase):
def setUp(self):
# Capture stdout and stderr for testing
self.stdout = StringIO()
self.stderr = StringIO()
... | 'Example Body') | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_search_engine.py | test_result_field_fallbacks | self.assertEqual | string_literal | 33 | import unittest
from unittest.mock import patch, MagicMock
import sys
from io import StringIO
from tools.search_engine import search
class TestSearchEngine(unittest.TestCase):
def setUp(self):
# Capture stdout and stderr for testing
self.stdout = StringIO()
self.stderr = StringIO()
... | 'Example Title') | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_search_engine.py | test_no_results | self.assertIn | func_call | 34 | import unittest
from unittest.mock import patch, MagicMock
import sys
from io import StringIO
from tools.search_engine import search
class TestSearchEngine(unittest.TestCase):
def setUp(self):
# Capture stdout and stderr for testing
self.stdout = StringIO()
self.stderr = StringIO()
... | self.stderr.getvalue()) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_search_engine.py | test_no_results | self.assertEqual | func_call | 37 | import unittest
from unittest.mock import patch, MagicMock
import sys
from io import StringIO
from tools.search_engine import search
class TestSearchEngine(unittest.TestCase):
def setUp(self):
# Capture stdout and stderr for testing
self.stdout = StringIO()
self.stderr = StringIO()
... | self.stdout.getvalue().strip()) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_process_urls | self.assertEqual | numeric_literal | 45 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.async_playwright')
@patch('tools.web_scraper.Pool')
a... | 2) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_parse_html | self.assertEqual | string_literal | 16 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_parse_html(self):
# Test with empty or None input
self.assert... | "") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_parse_html | self.assertIn | variable | 32 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_parse_html(self):
# Test with empty or None input
self.assertE... | result) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_fetch_page | self.assertIsNone | variable | 35 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.logger')
async def test_fetch_page(self, mock_logger):
... | content) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_validate_url | self.assertFalse | func_call | 23 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_validate_url(self):
# Test valid URLs
self.assertTrue(validate_... | validate_url('')) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_process_urls | self.assertEqual | string_literal | 46 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.async_playwright')
@patch('tools.web_scraper.Pool')
a... | "Parsed content 1") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_process_urls | self.assertEqual | string_literal | 47 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.async_playwright')
@patch('tools.web_scraper.Pool')
a... | "Parsed content 2") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_validate_url | self.assertFalse | func_call | 21 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_validate_url(self):
# Test valid URLs
self.assertTrue(validate_... | validate_url('http://')) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_validate_url | self.assertFalse | func_call | 22 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_validate_url(self):
# Test valid URLs
self.assertTrue(validate_... | validate_url('https://')) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_validate_url | self.assertFalse | func_call | 20 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_validate_url(self):
# Test valid URLs
self.assertTrue(validate_... | validate_url('not-a-url')) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_fetch_page | assert_* | string_literal | 29 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.logger')
async def test_fetch_page(self, mock_logger):
... | "Fetching https://example.com") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_validate_url | self.assertTrue | func_call | 15 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
def test_validate_url(self):
# Test valid URLs
self.assertTrue( | validate_url('https://example.com')) | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_fetch_page | self.assertEqual | string_literal | 28 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.logger')
async def test_fetch_page(self, mock_logger):
... | "<html><body>Test content</body></html>") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_fetch_page | assert_* | string_literal | 30 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.logger')
async def test_fetch_page(self, mock_logger):
... | "Successfully fetched https://example.com") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
grapeot/devin.cursorrules | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | train | train | tests/test_web_scraper.py | test_fetch_page | assert_* | string_literal | 36 | import unittest
from unittest.mock import patch, MagicMock, AsyncMock
import asyncio
from tools.web_scraper import (
validate_url,
parse_html,
fetch_page,
process_urls
)
class TestWebScraper(unittest.TestCase):
@patch('tools.web_scraper.logger')
async def test_fetch_page(self, mock_logger):
... | "Error fetching https://example.com: Network error") | 3d47100b1d46c8c008002b23f4781db7ee99b00b | 7 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | gql-checker/tests/test_flake8_linter.py | test_expected_error | assert | variable | 54 | import ast
import re
import os
import pycodestyle
import pytest
from gql_checker.flake8_linter import Linter
from tests.utils import extract_expected_errors
def load_test_cases():
base_path = os.path.dirname(__file__)
test_case_path = os.path.join(base_path, "test_cases")
test_case_files = os.listdir(te... | expected_codes | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | gql-checker/tests/test_flake8_linter.py | test_expected_error | assert | func_call | 55 | import ast
import re
import os
import pycodestyle
import pytest
from gql_checker.flake8_linter import Linter
from tests.utils import extract_expected_errors
def load_test_cases():
base_path = os.path.dirname(__file__)
test_case_path = os.path.join(base_path, "test_cases")
test_case_files = os.listdir(te... | set(expected_messages) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | gql-checker/tests/test_pylama_linter.py | test_expected_error | assert | variable | 48 | import ast
import os
import pytest
from gql_checker import pylama_linter
from tests.utils import extract_expected_errors
def load_test_cases():
base_path = os.path.dirname(__file__)
test_case_path = os.path.join(base_path, "test_cases")
test_case_files = os.listdir(test_case_path)
test_cases = []
... | expected_codes | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | gql-checker/tests/test_pylama_linter.py | test_expected_error | assert | func_call | 49 | import ast
import os
import pytest
from gql_checker import pylama_linter
from tests.utils import extract_expected_errors
def load_test_cases():
base_path = os.path.dirname(__file__)
test_case_path = os.path.join(base_path, "test_cases")
test_case_files = os.listdir(test_case_path)
test_cases = []
... | set(expected_messages) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/conftest.py | send_connection_ack | assert | string_literal | 136 | import asyncio
import json
import logging
import os
import pathlib
import ssl
import sys
import tempfile
import types
from concurrent.futures import ThreadPoolExecutor
from typing import Union
import pytest
from gql import Client
all_transport_dependencies = ["aiohttp", "requests", "websockets", "botocore"]
def pyt... | "phx_join" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/conftest.py | start | assert | string_literal | 153 | import asyncio
import json
import logging
import os
import pathlib
import ssl
import sys
import tempfile
import types
from concurrent.futures import ThreadPoolExecutor
from typing import Union
import pytest
from gql import Client
all_transport_dependencies = ["aiohttp", "requests", "websockets", "botocore"]
def pyt... | "127.0.0.1" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/conftest.py | send_connection_ack | assert | string_literal | 151 | import asyncio
import json
import logging
import os
import pathlib
import ssl
import sys
import tempfile
import types
from concurrent.futures import ThreadPoolExecutor
from typing import Union
import pytest
from gql import Client
all_transport_dependencies = ["aiohttp", "requests", "websockets", "botocore"]
def pyt... | "connection_init" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/conftest.py | wait_connection_terminate | assert | string_literal | 162 | import asyncio
import json
import logging
import os
import pathlib
import ssl
import sys
import tempfile
import types
from concurrent.futures import ThreadPoolExecutor
from typing import Union
import pytest
from gql import Client
all_transport_dependencies = ["aiohttp", "requests", "websockets", "botocore"]
def pyt... | "connection_terminate" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_datetime.py | test_seconds | assert | numeric_literal | 82 | from datetime import datetime, timedelta
from typing import Any, Dict, Optional
import pytest
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
GraphQLInputField,
GraphQLInputObject... | 432000 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_datetime.py | test_latest | assert | variable | 83 | from datetime import datetime, timedelta
from typing import Any, Dict, Optional
import pytest
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
GraphQLInputField,
GraphQLInputObject... | in_five_days | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_datetime.py | test_shift_days | assert | func_call | 80 | from datetime import datetime, timedelta
from typing import Any, Dict, Optional
import pytest
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
GraphQLInputField,
GraphQLInputObject... | datetime.fromisoformat("2021-11-17T11:58:13.461161") | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum | assert | numeric_literal | 50 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | 0 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_parse_value_enum | assert | variable | 49 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | RED | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_opposite_color_literal | assert | variable | 55 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | CYAN | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_serialize_enum | assert | string_literal | 48 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | "RED" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum | assert | string_literal | 51 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | "GREEN" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum | assert | complex_expr | 44 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | Color.RED | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum_errors | pytest.raises | variable | 44 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | KeyError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_get_all_colors | assert | variable | 54 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | ALL_COLORS | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum_errors | pytest.raises | variable | 49 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | TypeError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_update_schema_enum_errors | assert | func_call | 47 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | str(exc_info) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_list_of_list_of_list | assert | variable | 54 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | list_of_list_of_list | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_list_of_list | assert | complex_expr | 54 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | list_of_list_of_list[0] | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_enum_colors.py | test_list | assert | complex_expr | 54 | from enum import Enum
import pytest
from graphql import (
GraphQLArgument,
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
)
from gql import Client, gql
from gql.utilities import update_schema_enum
def resolve_opposite(_root, _info, color):
... | list_of_list_of_list[0][0] | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_json_value_input_in_ast | assert | string_literal | 69 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | "Tom" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_json_value_input_in_ast_with_variables | assert | string_literal | 89 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | "Barbara" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_none_json_value_input_in_dsl_argument | pytest.raises | variable | 47 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | GraphQLError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_none_json_value_input_in_dsl_argument | assert | func_call | 50 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | str(exc_info.value) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_json_value_output | assert | func_call | 53 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | serialize_json(root_value["players"]) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_json_value_input_in_dsl_argument | assert | string_literal | 59 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | """addPlayer( player: {name: "Tim", level: 0, is_connected: false, score: 5, friends: ["Lea"]} )""" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_json.py | test_json_value_input_with_none_list_in_dsl_argument | assert | string_literal | 59 | from typing import Any, Dict, Optional
import pytest
from graphql import (
GraphQLArgument,
GraphQLError,
GraphQLField,
GraphQLFloat,
GraphQLInt,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLSchema,
)
from graphql.language import ValueNode
from graphql.utilities impo... | """addPlayer( player: {name: "Bob", level: 9001, is_connected: true, score: 666.66, friends: null} )""" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_custom_scalar_in_input_query | assert | numeric_literal | 117 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | 5 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_gql_cli_print_schema | assert | numeric_literal | 174 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | 0 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_custom_scalar_in_input_query | assert | numeric_literal | 123 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | 10 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_serialize_value_with_nullable_type | assert | none_literal | 164 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_custom_scalar_subscribe_in_input_variable_values_serialized | assert | variable | 131 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | result | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_update_schema_scalars_scalar_not_found_in_schema | pytest.raises | variable | 166 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | KeyError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_money.py | test_update_schema_scalars_invalid_scalar | pytest.raises | variable | 162 | import asyncio
from math import isfinite
from typing import Any, Dict, NamedTuple, Optional
import pytest
from graphql import graphql_sync
from graphql.error import GraphQLError
from graphql.language import ValueNode
from graphql.pyutils import inspect
from graphql.type import (
GraphQLArgument,
GraphQLField,
... | TypeError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/custom_scalars/test_parse_results.py | test_parse_results_null_mapping | assert | collection | 53 | from graphql.type import (
GraphQLArgument,
GraphQLField,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
GraphQLString,
)
from gql import Client, gql
static_result = {
"edges": [
{
"node": {
"from": {"address": "0x45b9... | { "test": static_result } | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/nested_input/test_nested_input.py | test_nested_input | assert | collection | 16 | import pytest
from gql import Client
from gql.dsl import DSLQuery, DSLSchema, dsl_gql
from tests.nested_input.schema import NestedInputSchema
def ds():
return DSLSchema(NestedInputSchema)
def client():
return Client(schema=NestedInputSchema)
def test_nested_input(ds, client):
query = dsl_gql(DSLQuery(ds... | {"echo": '{"foo": 1}'} | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/nested_input/test_nested_input.py | test_nested_input_2 | assert | collection | 18 | import pytest
from gql import Client
from gql.dsl import DSLQuery, DSLSchema, dsl_gql
from tests.nested_input.schema import NestedInputSchema
def ds():
return DSLSchema(NestedInputSchema)
def client():
return Client(schema=NestedInputSchema)
def test_nested_input_2(ds, client):
query = dsl_gql(
... | {"echo": '{"foo": 1, "child": {"foo": 2}}'} | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/nested_input/test_nested_input.py | test_nested_input_3 | assert | collection | 22 | import pytest
from gql import Client
from gql.dsl import DSLQuery, DSLSchema, dsl_gql
from tests.nested_input.schema import NestedInputSchema
def ds():
return DSLSchema(NestedInputSchema)
def client():
return Client(schema=NestedInputSchema)
def test_nested_input_3(ds, client):
query = dsl_gql(
... | { "echo": '{"foo": 1, "child": {"foo": 2, "child": {"foo": 3}}}' } | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_ast_from_value_with_input_type_and_not_mapping_value | assert | none_literal | 49 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_hero_name_query_result | assert | variable | 51 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | expected | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_fragment_with_name_changed | assert | string_literal | 51 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | "...ABC" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_fragment_with_name_changed | assert | string_literal | 55 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | "...DEF" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_ast_from_value_with_invalid_type | pytest.raises | variable | 48 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | TypeError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_invalid_meta_field_selection | assert | string_literal | 54 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | "__typename" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_dsl.py | test_ast_from_value_with_undefined | pytest.raises | variable | 48 | import pytest
from graphql import (
FloatValueNode,
GraphQLError,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
IntValueNode,
ListTypeNode,
NamedTypeNode,
NameNode,
NonNullTypeNode,
NullValueNode,
Undefined,
print_ast,
)
from graphql.utilit... | GraphQLError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_parse_results.py | test_return_none_if_result_is_none | assert | none_literal | 23 | import pytest
from graphql import GraphQLError
from gql import gql
from gql.utilities import parse_result
from tests.starwars.schema import StarWarsSchema
def test_return_none_if_result_is_none():
query = gql(
"""
query {
hero {
id
}
}
"""
)
... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_parse_results.py | test_hero_name_and_friends_query | assert | variable | 37 | import pytest
from graphql import GraphQLError
from gql import gql
from gql.utilities import parse_result
from tests.starwars.schema import StarWarsSchema
def test_hero_name_and_friends_query():
query = gql(
"""
query HeroNameAndFriendsQuery {
hero {
id
friends {
... | parsed_result | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_parse_results.py | test_invalid_result_raise_error | assert | func_call | 27 | import pytest
from graphql import GraphQLError
from gql import gql
from gql.utilities import parse_result
from tests.starwars.schema import StarWarsSchema
def test_invalid_result_raise_error():
query = gql(
"""
{
hero {
id
}
}
"""
)
result ... | str(exc_info) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_parse_results.py | test_invalid_result_raise_error | pytest.raises | variable | 23 | import pytest
from graphql import GraphQLError
from gql import gql
from gql.utilities import parse_result
from tests.starwars.schema import StarWarsSchema
def test_invalid_result_raise_error():
query = gql(
"""
{
hero {
id
}
}
"""
)
result ... | GraphQLError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_query.py | test_hero_name_query | assert | variable | 23 | import pytest
from graphql import GraphQLError
from gql import Client, gql
from tests.starwars.schema import StarWarsSchema
def client():
return Client(schema=StarWarsSchema)
def test_hero_name_query(client):
query = gql(
"""
query HeroNameQuery {
hero {
name
}... | expected | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_query.py | test_parse_error | assert | func_call | 20 | import pytest
from graphql import GraphQLError
from gql import Client, gql
from tests.starwars.schema import StarWarsSchema
def client():
return Client(schema=StarWarsSchema)
def test_parse_error(client):
with pytest.raises(Exception) as exc_info:
gql(
"""
qeury
""... | str(error) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_query.py | test_parse_error | pytest.raises | variable | 12 | import pytest
from graphql import GraphQLError
from gql import Client, gql
from tests.starwars.schema import StarWarsSchema
def client():
return Client(schema=StarWarsSchema)
def test_parse_error(client):
with pytest.raises( | Exception) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_subscription.py | test_subscription_support_using_client_invalid_field | assert | numeric_literal | 37 | import pytest
from graphql import ExecutionResult, GraphQLError, subscribe
from gql import Client, gql
from .fixtures import reviews
from .schema import StarWarsSchema
subscription_str = """
subscription ListenEpisodeReviews($ep: Episode!) {
reviewAdded(episode: $ep) {
stars,
commentary,
... | 1 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_subscription.py | test_subscription_support_using_client_invalid_field | assert | none_literal | 40 | import pytest
from graphql import ExecutionResult, GraphQLError, subscribe
from gql import Client, gql
from .fixtures import reviews
from .schema import StarWarsSchema
subscription_str = """
subscription ListenEpisodeReviews($ep: Episode!) {
reviewAdded(episode: $ep) {
stars,
commentary,
... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_subscription.py | test_subscription_support | assert | variable | 37 | import pytest
from graphql import ExecutionResult, GraphQLError, subscribe
from gql import Client, gql
from .fixtures import reviews
from .schema import StarWarsSchema
subscription_str = """
subscription ListenEpisodeReviews($ep: Episode!) {
reviewAdded(episode: $ep) {
stars,
commentary,
... | expected | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_subscription.py | test_subscription_support_using_client_invalid_field | assert | string_literal | 45 | import pytest
from graphql import ExecutionResult, GraphQLError, subscribe
from gql import Client, gql
from .fixtures import reviews
from .schema import StarWarsSchema
subscription_str = """
subscription ListenEpisodeReviews($ep: Episode!) {
reviewAdded(episode: $ep) {
stars,
commentary,
... | "The subscription field 'qsdfqsdfqsdf' is not defined." | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_validation.py | test_build_client_schema_invalid_introspection | pytest.raises | variable | 87 | import pytest
from gql import Client, gql
from .schema import StarWarsIntrospection, StarWarsSchema
def local_schema():
return Client(schema=StarWarsSchema)
def typedef_schema():
return Client(
schema="""
schema {
query: Query
}
interface Character {
appearsIn: [Episode]
friends: [Character]
... | TypeError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/starwars/test_validation.py | test_build_client_schema_invalid_introspection | assert | func_call | 90 | import pytest
from gql import Client, gql
from .schema import StarWarsIntrospection, StarWarsSchema
def local_schema():
return Client(schema=StarWarsSchema)
def typedef_schema():
return Client(
schema="""
schema {
query: Query
}
interface Character {
appearsIn: [Episode]
friends: [Character]
... | str(exc_info.value) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | test_aiohttp_using_cli | assert | numeric_literal | 115 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | 0 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | test_aiohttp_using_cli_invalid_param | assert | numeric_literal | 117 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | 1 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | single_upload_handler | assert | string_literal | 58 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | "0" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | handler | assert | string_literal | 113 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | "1" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | single_upload_handler | assert | none_literal | 63 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp.py | test_aiohttp_reconnecting_session | assert | string_literal | 125 | import io
import json
from typing import Mapping
import pytest
from gql import Client, gql
from gql.cli import get_parser, main
from gql.transport.exceptions import (
TransportAlreadyConnected,
TransportClosed,
TransportProtocolError,
TransportQueryError,
TransportServerError,
)
from .conftest im... | "AF" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp_online.py | test_aiohttp_simple_query | assert | string_literal | 54 | import asyncio
import sys
from typing import Dict
import pytest
from gql import Client, gql
from gql.transport.exceptions import TransportQueryError
@pytest.mark.aiohttp
@pytest.mark.online
@pytest.mark.asyncio
@pytest.mark.parametrize("protocol", ["http", "https"])
async def test_aiohttp_simple_query(event_loop, pr... | "AF" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp_online.py | query_task2 | assert | string_literal | 21 | import asyncio
import sys
from typing import Dict
import pytest
from gql import Client, gql
from gql.transport.exceptions import TransportQueryError
async def query_task2():
result = await session.execute(query2)
assert isinstance(result, Dict)
print(result)
... | "Africa" | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_aiohttp_online.py | test_aiohttp_invalid_query | pytest.raises | variable | 35 | import asyncio
import sys
from typing import Dict
import pytest
from gql import Client, gql
from gql.transport.exceptions import TransportQueryError
@pytest.mark.aiohttp
@pytest.mark.online
@pytest.mark.asyncio
async def test_aiohttp_invalid_query(event_loop):
from gql.transport.aiohttp import AIOHTTPTransport
... | TransportQueryError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_minimal_args | assert | numeric_literal | 16 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_minimal_args(fake_session_factory):
from gql.transport.appsync_auth import AppSyncIAMAuthentication
from gql.transport.apps... | 10 | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_minimal_args | assert | collection | 20 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_minimal_args(fake_session_factory):
from gql.transport.appsync_auth import AppSyncIAMAuthentication
from gql.transport.apps... | {} | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_no_credentials | assert | none_literal | 17 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_no_credentials(caplog, fake_session_factory):
import botocore.exceptions
from gql.transport.appsync_websockets import AppSy... | None | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_jwt_auth | assert | variable | 14 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.websockets
def test_appsync_init_with_jwt_auth():
from gql.transport.appsync_auth import AppSyncJWTAuthentication
from gql.transport.appsync_websockets import ... | auth | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_minimal_args | assert | bool_literal | 19 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_minimal_args(fake_session_factory):
from gql.transport.appsync_auth import AppSyncIAMAuthentication
from gql.transport.apps... | False | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_no_credentials | assert | complex_expr | 23 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_no_credentials(caplog, fake_session_factory):
import botocore.exceptions
from gql.transport.appsync_websockets import AppSy... | caplog.text | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_munge_url | assert | variable | 30 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_munge_url(fake_signer_factory, fake_request_factory):
from gql.transport.appsync_auth import AppSyncIAMAuthentication
from gql.transport.apps... | expected_url | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_iam_auth_and_no_region | pytest.raises | variable | 24 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_iam_auth_and_no_region(
caplog, fake_credentials_factory, fake_session_factory
):
"""
WARNING: this test will fail if:... | NoRegionError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_no_credentials | pytest.raises | complex_expr | 12 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.botocore
def test_appsync_init_with_no_credentials(caplog, fake_session_factory):
import botocore.exceptions
from gql.transport.appsync_websockets import AppSy... | botocore.exceptions.NoCredentialsError) | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
graphql-python/gql | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | train | train | tests/test_appsync_auth.py | test_appsync_init_with_jwt_auth | assert | collection | 16 | import pytest
mock_transport_host = "appsyncapp.awsgateway.com.example.org"
mock_transport_url = f"https://{mock_transport_host}/graphql"
@pytest.mark.websockets
def test_appsync_init_with_jwt_auth():
from gql.transport.appsync_auth import AppSyncJWTAuthentication
from gql.transport.appsync_websockets import ... | { "host": mock_transport_host, "Authorization": "some-jwt", } | e53b168f463b62bc7f577d785f6ed0c72acc03bd | 110 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.