repo_id stringclasses 409
values | prefix large_stringlengths 34 36.3k | target large_stringlengths 1 498 | assertion_type stringclasses 31
values | difficulty stringclasses 8
values | test_file stringlengths 10 121 | test_function stringlengths 1 104 | test_class stringlengths 0 51 | lineno int32 2 11.3k | commit_idx int32 |
|---|---|---|---|---|---|---|---|---|---|
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.conf import settings
from django.template.base import Template
from django.template.context import Context
from django.test import override_settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.templ... | None | assert | none_literal | tests/test_utils.py | test_optgroup_filter_nested | 125 | null | |
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.forms.models import formset_factory, modelformset_factory
from django.shortcuts import render
from django.template import Context, Template
from django.test.html import parse_html
from django.test.utils import override_settings
from django.utils.translati... | 3 | assert | numeric_literal | tests/test_layout.py | test_keepcontext_context_manager | 350 | null | |
django-crispy-forms/django-crispy-forms | import re
import django
import pytest
from django import forms
from django.forms.models import formset_factory
from django.middleware.csrf import _get_new_csrf_string
from django.template import Context, Template, TemplateSyntaxError
from django.urls import reverse
from crispy_forms.bootstrap import AppendedText, Fie... | 7 | assert | numeric_literal | tests/test_form_helper.py | test_render_required_fields | 405 | null | |
django-crispy-forms/django-crispy-forms | import pytest
from django import forms
from crispy_forms.bootstrap import AppendedText
from crispy_forms.exceptions import DynamicError
from crispy_forms.helper import FormHelper, FormHelpersException
from crispy_forms.layout import HTML, Div, Field, Fieldset, Layout, MultiField, Pointer
from .forms import SampleForm... | "password2" | assert | string_literal | tests/test_dynamic_api.py | test_wrap_all_fields | 24 | null | |
django-crispy-forms/django-crispy-forms | import re
import django
import pytest
from django import forms
from django.forms.models import formset_factory
from django.middleware.csrf import _get_new_csrf_string
from django.template import Context, Template, TemplateSyntaxError
from django.urls import reverse
from crispy_forms.bootstrap import AppendedText, Fie... | 4 | assert | numeric_literal | tests/test_form_helper.py | test_render_unmentioned_fields_order | 353 | null | |
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.conf import settings
from django.template.base import Template
from django.template.context import Context
from django.test import override_settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.templ... | parse_expected("utils_test.html") | assert | func_call | tests/test_utils.py | test_parse_expected_and_form | 62 | null | |
django-crispy-forms/django-crispy-forms | import re
import django
import pytest
from django import forms
from django.forms.models import formset_factory
from django.middleware.csrf import _get_new_csrf_string
from django.template import Context, Template, TemplateSyntaxError
from django.urls import reverse
from crispy_forms.bootstrap import AppendedText, Fie... | 8 | assert | numeric_literal | tests/test_form_helper.py | test_inputs | 45 | null | |
django-crispy-forms/django-crispy-forms | import pytest
from django.forms.boundfield import BoundField
from django.forms.formsets import formset_factory
from django.template import Context, Template
from crispy_forms.exceptions import CrispyError
from crispy_forms.templatetags.crispy_forms_field import crispy_addon
from .forms import SampleForm
def test_cri... | TypeError) | pytest.raises | variable | tests/test_tags.py | test_crispy_addon | 215 | null | |
django-crispy-forms/django-crispy-forms | import pytest
from django.forms.boundfield import BoundField
from django.forms.formsets import formset_factory
from django.template import Context, Template
from crispy_forms.exceptions import CrispyError
from crispy_forms.templatetags.crispy_forms_field import crispy_addon
from .forms import SampleForm
def test_cri... | 0 | assert | numeric_literal | tests/test_tags.py | test_crispy_filter_with_formset | 167 | null | |
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.conf import settings
from django.template.base import Template
from django.template.context import Context
from django.test import override_settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.templ... | rendered | assert | variable | tests/test_utils.py | test_custom_bound_field | 56 | null | |
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.conf import settings
from django.template.base import Template
from django.template.context import Context
from django.test import override_settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.templ... | "Audio" | assert | string_literal | tests/test_utils.py | test_optgroup_filter_nested | 71 | null | |
django-crispy-forms/django-crispy-forms | import django
import pytest
from django import forms
from django.conf import settings
from django.template.base import Template
from django.template.context import Context
from django.test import override_settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.templ... | AttributeError) | pytest.raises | variable | tests/test_utils.py | test_get_template_pack | 235 | null | |
django-crispy-forms/django-crispy-forms | import pytest
from django.forms.boundfield import BoundField
from django.forms.formsets import formset_factory
from django.template import Context, Template
from crispy_forms.exceptions import CrispyError
from crispy_forms.templatetags.crispy_forms_field import crispy_addon
from .forms import SampleForm
def test_as_... | error_class) | pytest.raises | variable | tests/test_tags.py | test_as_crispy_field_non_field | 115 | null | |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | 2 | assert | numeric_literal | tests/test_jwks_client.py | test_get_jwt_set_refresh_cache | TestPyJWKClient | 326 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | "user123" | assert | string_literal | tests/test_api_jwt.py | test_encode_decode_sub_claim | TestJWT | 931 | null |
jpadilla/pyjwt | import json
from decimal import Decimal
import pytest
from jwt.algorithms import NoneAlgorithm, has_crypto
from jwt.api_jwk import PyJWK
from jwt.api_jws import PyJWS
from jwt.exceptions import (
DecodeError,
InvalidAlgorithmError,
InvalidSignatureError,
InvalidTokenError,
)
from jwt.utils import base... | "bar" | assert | string_literal | tests/test_api_jws.py | test_encode_with_typ_without_keywords | TestJWS | 885 | null |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | "sig" | assert | string_literal | tests/test_jwks_client.py | test_get_signing_key | TestPyJWKClient | 179 | null |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWKSet:
@cryp... | 1 | assert | numeric_literal | tests/test_api_jwk.py | test_keyset_with_unknown_alg | TestPyJWKSet | 316 | null |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | kid | assert | variable | tests/test_jwks_client.py | test_get_signing_key | TestPyJWKClient | 178 | null |
jpadilla/pyjwt | from contextlib import nullcontext
import pytest
from contextlib import AbstractContextManager
from jwt.utils import force_bytes, from_base64url_uint, is_ssh_key, to_base64url_uint
@pytest.mark.parametrize(
"inputval,expected",
[
(0, nullcontext(b"AA")),
(1, nullcontext(b"AQ")),
(255... | e | assert | variable | tests/test_utils.py | test_to_base64url_uint | 26 | null | |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWKSet:
@cryp... | 2 | assert | numeric_literal | tests/test_api_jwk.py | test_keyset_with_unknown_alg | TestPyJWKSet | 314 | null |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | 1 | assert | numeric_literal | tests/test_jwks_client.py | test_fetch_data_forwards_headers_to_correct_url | TestPyJWKClient | 119 | null |
jpadilla/pyjwt | from contextlib import nullcontext
import pytest
from contextlib import AbstractContextManager
from jwt.utils import force_bytes, from_base64url_uint, is_ssh_key, to_base64url_uint
@pytest.mark.parametrize(
"key_format",
(
b"ssh-ed25519",
b"ssh-rsa",
b"ssh-dss",
b"ecdsa-sha2-... | True | assert | bool_literal | tests/test_utils.py | test_is_ssh_key | 61 | null | |
jpadilla/pyjwt | from jwt.exceptions import MissingRequiredClaimError
def test_missing_required_claim_error_has_proper_str() -> None:
exc = MissingRequiredClaimError("abc")
assert str(exc) == | 'Token is missing the "abc" claim' | assert | string_literal | tests/test_exceptions.py | test_missing_required_claim_error_has_proper_str | 7 | null | |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | "RSA" | assert | string_literal | tests/test_jwks_client.py | test_get_signing_key | TestPyJWKClient | 177 | null |
jpadilla/pyjwt | import base64
import json
from typing import Union, cast
import pytest
from jwt.algorithms import HMACAlgorithm, NoneAlgorithm, has_crypto
from jwt.exceptions import InvalidKeyError
from jwt.utils import base64url_decode
from .keys import load_ec_pub_key_p_521, load_hmac_key, load_rsa_pub_key
from .utils import cryp... | key | assert | variable | tests/test_algorithms.py | test_ec_curve_validation_accepts_correct_curve_for_es256 | TestECCurveValidation | 1,268 | null |
jpadilla/pyjwt | import json
from decimal import Decimal
import pytest
from jwt.algorithms import NoneAlgorithm, has_crypto
from jwt.api_jwk import PyJWK
from jwt.api_jws import PyJWS
from jwt.exceptions import (
DecodeError,
InvalidAlgorithmError,
InvalidSignatureError,
InvalidTokenError,
)
from jwt.utils import base... | 1 | assert | numeric_literal | tests/test_api_jws.py | test_decode_warns_on_unsupported_kwarg | TestJWS | 974 | null |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | None | assert | none_literal | tests/test_jwks_client.py | test_get_jwk_set_caches_result | TestPyJWKClient | 243 | null |
jpadilla/pyjwt | import base64
import json
from typing import Union, cast
import pytest
from jwt.algorithms import HMACAlgorithm, NoneAlgorithm, has_crypto
from jwt.exceptions import InvalidKeyError
from jwt.utils import base64url_decode
from .keys import load_ec_pub_key_p_521, load_hmac_key, load_rsa_pub_key
from .utils import cryp... | msg | assert | variable | tests/test_algorithms.py | test_hmac_short_key_warns_by_default_hs256 | TestKeyLengthValidation | 1,438 | null |
jpadilla/pyjwt | from contextlib import nullcontext
import pytest
from contextlib import AbstractContextManager
from jwt.utils import force_bytes, from_base64url_uint, is_ssh_key, to_base64url_uint
@pytest.mark.parametrize(
"key_format",
(
b"ssh-ed25519",
b"ssh-rsa",
b"ssh-dss",
b"ecdsa-sha2-... | False | assert | bool_literal | tests/test_utils.py | test_is_ssh_key | 62 | null | |
jpadilla/pyjwt | import jwt
from .utils import utc_timestamp
def test_encode_decode() -> None:
"""
This test exists primarily to ensure that calls to jwt.encode and
jwt.decode don't explode. Most functionality is tested by the PyJWT class
tests. This is primarily a sanity check to make sure we don't break the
publ... | payload | assert | variable | tests/test_jwt.py | test_encode_decode | 19 | null | |
jpadilla/pyjwt | import pytest
import jwt
from jwt.algorithms import get_default_algorithms
from jwt.exceptions import InvalidKeyError
from .utils import crypto_required
priv_key_bytes = b"""-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIIbBhdo2ah7X32i50GOzrCr4acZTe6BezUdRIixjTAdL
-----END PRIVATE KEY-----"""
pub_key_bytes = (
... | InvalidKeyError) | pytest.raises | variable | tests/test_advisory.py | test_ghsa_ffqj_6fqr_9h24 | TestAdvisory | 63 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | "user789" | assert | string_literal | tests/test_api_jwt.py | test_decode_with_sub_claim_and_none_subject | TestJWT | 991 | null |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWK:
@crypto_r... | "RSA" | assert | string_literal | tests/test_api_jwk.py | test_should_load_key_from_jwk_data_dict | TestPyJWK | 38 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | False | assert | bool_literal | tests/test_api_jwt.py | test_jwt_with_options | TestJWT | 42 | null |
jpadilla/pyjwt | import contextlib
import io
import json
import ssl
import time
from collections.abc import Iterator
from unittest import mock
from urllib.error import HTTPError, URLError
from email.message import Message
import pytest
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJ... | 0 | assert | numeric_literal | tests/test_jwks_client.py | test_get_signing_key_caches_result | TestPyJWKClient | 195 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | "iat" | assert | string_literal | tests/test_api_jwt.py | test_decode_should_raise_error_if_iat_required_but_not_present | TestJWT | 637 | null |
jpadilla/pyjwt | from contextlib import nullcontext
import pytest
from contextlib import AbstractContextManager
from jwt.utils import force_bytes, from_base64url_uint, is_ssh_key, to_base64url_uint
def test_force_bytes_raises_error_on_invalid_object() -> None:
with pytest.raises( | TypeError) | pytest.raises | variable | tests/test_utils.py | test_force_bytes_raises_error_on_invalid_object | 45 | null | |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | "exp" | assert | string_literal | tests/test_api_jwt.py | test_decode_should_raise_error_if_exp_required_but_not_present | TestJWT | 618 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | 1 | assert | numeric_literal | tests/test_api_jwt.py | test_decode_warns_on_unsupported_kwarg | TestJWT | 819 | null |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWK:
@crypto_... | "OKP" | assert | string_literal | tests/test_api_jwk.py | test_should_load_key_okp_without_alg_from_dict | TestPyJWK | 167 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | header_obj | assert | variable | tests/test_api_jwt.py | test_encode_with_typ | TestJWT | 224 | null |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | payload | assert | variable | tests/test_api_jwt.py | test_decode_with_expiration_with_leeway | TestJWT | 417 | null |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWK:
@crypto_... | "oct" | assert | string_literal | tests/test_api_jwk.py | test_should_load_key_hmac_from_dict | TestPyJWK | 142 | null |
jpadilla/pyjwt | import json
import pytest
from jwt.algorithms import has_crypto
from jwt.api_jwk import PyJWK, PyJWKSet
from jwt.exceptions import (
InvalidKeyError,
MissingCryptographyError,
PyJWKError,
PyJWKSetError,
)
from .utils import crypto_required, key_path, no_crypto_required
class TestPyJWK:
@crypto_... | "EC" | assert | string_literal | tests/test_api_jwk.py | test_should_load_key_ec_p256_from_dict | TestPyJWK | 94 | null |
jpadilla/pyjwt | import json
from decimal import Decimal
import pytest
from jwt.algorithms import NoneAlgorithm, has_crypto
from jwt.api_jwk import PyJWK
from jwt.api_jws import PyJWS
from jwt.exceptions import (
DecodeError,
InvalidAlgorithmError,
InvalidSignatureError,
InvalidTokenError,
)
from jwt.utils import base... | header | assert | variable | tests/test_api_jws.py | test_get_unverified_header_returns_header_values | TestJWS | 651 | null |
jpadilla/pyjwt | import json
from decimal import Decimal
import pytest
from jwt.algorithms import NoneAlgorithm, has_crypto
from jwt.api_jwk import PyJWK
from jwt.api_jws import PyJWS
from jwt.exceptions import (
DecodeError,
InvalidAlgorithmError,
InvalidSignatureError,
InvalidTokenError,
)
from jwt.utils import base... | KeyError) | pytest.raises | variable | tests/test_api_jws.py | test_unregister_algo_throws_error_if_not_registered | TestJWS | 76 | null |
jpadilla/pyjwt | import json
from decimal import Decimal
import pytest
from jwt.algorithms import NoneAlgorithm, has_crypto
from jwt.api_jwk import PyJWK
from jwt.api_jws import PyJWS
from jwt.exceptions import (
DecodeError,
InvalidAlgorithmError,
InvalidSignatureError,
InvalidTokenError,
)
from jwt.utils import base... | supported | assert | variable | tests/test_api_jws.py | test_unregister_algo_removes_algorithm | TestJWS | 67 | null |
jpadilla/pyjwt | from contextlib import nullcontext
import pytest
from contextlib import AbstractContextManager
from jwt.utils import force_bytes, from_base64url_uint, is_ssh_key, to_base64url_uint
@pytest.mark.parametrize(
"inputval,expected",
[
(b"AA", 0),
(b"AQ", 1),
(b"_w", 255),
(b"AQAB"... | expected | assert | variable | tests/test_utils.py | test_from_base64url_uint | 41 | null | |
jpadilla/pyjwt | import json
import zlib
from jwt import PyJWT
def test_decodes_complete_valid_jwt_with_compressed_payload() -> None:
# Test case from https://github.com/jpadilla/pyjwt/pull/753/files
example_payload = {"hello": "world"}
example_secret = "secret"
# payload made with the pako (https://nodeca.github.io/p... | { "header": {"alg": "HS256", "typ": "JWT"}, "payload": example_payload, "signature": ( b"\xd3\xcc\x07a\xeb\xa1\xd6\xb2W\x99\xc0\\2\xbc\xfa7" b"\x19\x9b\xc4\t\xc2B\x9d\xab\x192\x9fD\xd2$\xc6," ), } | assert | collection | tests/test_compressed_jwt.py | test_decodes_complete_valid_jwt_with_compressed_payload | 32 | null | |
jpadilla/pyjwt | import json
import time
from calendar import timegm
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import pytest
from jwt.types import Options
from jwt.api_jwt import PyJWT
from jwt.exceptions import (
DecodeError,
ExpiredSignatureError,
ImmatureSignatureError,
InvalidA... | TypeError) | pytest.raises | variable | tests/test_api_jwt.py | test_decode_with_invalid_audience_param_throws_exception | TestJWT | 131 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
@pytest.mark.complexity("simple")
def test_complexity_marker_simple(token_budget):
"""
Test that complexity marker works with pytest plugin fixture
This test should have a simple (200 token) budget
"""
assert token_bud... | "simple" | assert | string_literal | tests/unit/test_token_budget.py | test_complexity_marker_simple | 97 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
class TestPytestPluginIntegration:
def test_pm_context_fixture_available(self, pm_context):
"""Test that pm_context fixture is available"""
assert pm_context is not None
assert "memory_dir" in | pm_context | assert | variable | tests/integration/test_pytest_plugin.py | test_pm_context_fixture_available | TestPytestPluginIntegration | 40 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.self_check import SelfCheckProtocol
class TestSelfCheckProtocol:
def test_validate_failing_implementation(self, failing_implementation):
"""
Test validation of a failing implementation
Should fail multiple checks
"""
protocol = Self... | False | assert | bool_literal | tests/unit/test_self_check.py | test_validate_failing_implementation | TestSelfCheckProtocol | 40 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_has_official_docs_with_flag(self):
"""Test official docs check with direct flag"""
checker = ConfidenceChecker()
context = {"official_docs_verified": True}
result = c... | True | assert | bool_literal | tests/unit/test_confidence.py | test_has_official_docs_with_flag | TestConfidenceChecker | 112 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
class TestPytestPluginIntegration:
def test_confidence_checker_fixture_available(self, confidence_checker):
"""Test that confidence_checker fixture is available"""
assert confidence_checker is not | None | assert | none_literal | tests/integration/test_pytest_plugin.py | test_confidence_checker_fixture_available | TestPytestPluginIntegration | 15 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
@pytest.mark.complexity("simple")
def test_complexity_marker_simple(token_budget):
"""
Test that complexity marker works with pytest plugin fixture
This test should have a simple (200 token) budget
"""
assert token_bu... | 200 | assert | numeric_literal | tests/unit/test_token_budget.py | test_complexity_marker_simple | 96 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
class TestPytestPluginIntegration:
def test_all_fixtures_work_together(
self, confidence_checker, self_check_protocol, reflexion_pattern, token_budget
):
"""
Test that all PM Agent fixtures can be used together
This simulates a complete PM Agent workflow
... | 0 | assert | numeric_literal | tests/integration/test_pytest_plugin.py | test_all_fixtures_work_together | TestPytestPluginIntegration | 87 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
class TestTokenBudgetManager:
def test_token_usage_tracking(self):
"""Test token usage tracking if implemented"""
manager = TokenBudgetManager(complexity="simple")
# Check if usage tracking is available
... | 0 | assert | numeric_literal | tests/unit/test_token_budget.py | test_token_usage_tracking | TestTokenBudgetManager | 56 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_high_confidence_scenario(self, sample_context):
"""
Test that a well-prepared context returns high confidence (≥90%)
All checks pass:
- No duplicates (25%)
- ... | 0.9 | assert | numeric_literal | tests/unit/test_confidence.py | test_high_confidence_scenario | TestConfidenceChecker | 30 | null |
SuperClaude-Org/SuperClaude_Framework | from superclaude.cli.install_commands import (
install_commands,
list_available_commands,
list_installed_commands,
)
class TestInstallCommands:
def test_install_commands_skip_existing(self, tmp_path):
"""Test that existing commands are skipped without --force"""
target_dir = tmp_path /... | message2 | assert | variable | tests/unit/test_cli_install.py | test_install_commands_skip_existing | TestInstallCommands | 55 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
class TestPytestPluginIntegration:
def test_all_fixtures_work_together(
self, confidence_checker, self_check_protocol, reflexion_pattern, token_budget
):
"""
Test that all PM Agent fixtures can be used together
This simulates a complete PM Agent workflow
... | 0.9 | assert | numeric_literal | tests/integration/test_pytest_plugin.py | test_all_fixtures_work_together | TestPytestPluginIntegration | 64 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.self_check import SelfCheckProtocol
@pytest.mark.self_check
def test_self_check_marker_integration(self_check_protocol, sample_implementation):
"""
Test that self_check marker works with pytest plugin fixture
This test validates the fixture provided by pytest plugi... | 0 | assert | numeric_literal | tests/unit/test_self_check.py | test_self_check_marker_integration | 236 | null | |
SuperClaude-Org/SuperClaude_Framework | from superclaude.cli.install_commands import (
install_commands,
list_available_commands,
list_installed_commands,
)
def test_cli_integration():
"""
Integration test: verify CLI can import and use install functions
This tests that the CLI main.py can successfully import the functions
"""
... | 0 | assert | numeric_literal | tests/unit/test_cli_install.py | test_cli_integration | 180 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
@pytest.mark.complexity("medium")
def test_complexity_marker_medium(token_budget):
"""
Test that complexity marker works with medium budget
This test should have a medium (1000 token) budget
"""
assert token_budget.li... | 1000 | assert | numeric_literal | tests/unit/test_token_budget.py | test_complexity_marker_medium | 107 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_confidence_checks_recorded(self, sample_context):
"""Test that confidence checks are recorded in context"""
checker = ConfidenceChecker()
checker.assess(sample_context)
... | sample_context | assert | variable | tests/unit/test_confidence.py | test_confidence_checks_recorded | TestConfidenceChecker | 73 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.self_check import SelfCheckProtocol
class TestSelfCheckProtocol:
def test_check_requirements_met(self):
"""Test requirements validation"""
protocol = SelfCheckProtocol()
# All requirements met
impl_complete = {
"requirements": [... | unmet | assert | variable | tests/unit/test_self_check.py | test_check_requirements_met | TestSelfCheckProtocol | 84 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
@pytest.mark.complexity("medium")
def test_complexity_marker_medium(token_budget):
"""
Test that complexity marker works with medium budget
This test should have a medium (1000 token) budget
"""
assert token_budget.lim... | "medium" | assert | string_literal | tests/unit/test_token_budget.py | test_complexity_marker_medium | 108 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.self_check import SelfCheckProtocol
class TestSelfCheckProtocol:
def test_check_evidence_exists(self):
"""Test evidence requirement validation"""
protocol = SelfCheckProtocol()
# All evidence present
impl_with_evidence = {
"evid... | 3 | assert | numeric_literal | tests/unit/test_self_check.py | test_check_evidence_exists | TestSelfCheckProtocol | 125 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_medium_confidence_scenario(self):
"""
Test medium confidence scenario (70-89%)
Some checks pass, some don't
"""
checker = ConfidenceChecker()
context ... | confidence | assert | variable | tests/unit/test_confidence.py | test_medium_confidence_scenario | TestConfidenceChecker | 63 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.token_budget import TokenBudgetManager
@pytest.mark.complexity("complex")
def test_complexity_marker_complex(token_budget):
"""
Test that complexity marker works with complex budget
This test should have a complex (2500 token) budget
"""
assert token_budge... | 2500 | assert | numeric_literal | tests/unit/test_token_budget.py | test_complexity_marker_complex | 118 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
@pytest.mark.confidence_check
def test_confidence_check_marker_integration(confidence_checker):
"""
Test that confidence_check marker works with pytest plugin fixture
This test should skip if confidence < 70%
"""
context ... | 0.7 | assert | numeric_literal | tests/unit/test_confidence.py | test_confidence_check_marker_integration | 181 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_low_confidence_scenario(self, low_confidence_context):
"""
Test that an unprepared context returns low confidence (<70%)
No checks pass: 0%
"""
checker = Conf... | 0.0 | assert | numeric_literal | tests/unit/test_confidence.py | test_low_confidence_scenario | TestConfidenceChecker | 43 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.reflexion import ReflexionPattern
@pytest.mark.reflexion
def test_reflexion_marker_integration(reflexion_pattern):
"""
Test that reflexion marker works with pytest plugin fixture
If this test fails, reflexion should record the failure
"""
# Test that fixtur... | None | assert | none_literal | tests/unit/test_reflexion.py | test_reflexion_marker_integration | 146 | null | |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_high_confidence_scenario(self, sample_context):
"""
Test that a well-prepared context returns high confidence (≥90%)
All checks pass:
- No duplicates (25%)
- ... | 1.0 | assert | numeric_literal | tests/unit/test_confidence.py | test_high_confidence_scenario | TestConfidenceChecker | 31 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.self_check import SelfCheckProtocol
class TestSelfCheckProtocol:
def test_check_requirements_met(self):
"""Test requirements validation"""
protocol = SelfCheckProtocol()
# All requirements met
impl_complete = {
"requirements": [... | 1 | assert | numeric_literal | tests/unit/test_self_check.py | test_check_requirements_met | TestSelfCheckProtocol | 83 | null |
SuperClaude-Org/SuperClaude_Framework | from superclaude.cli.install_commands import (
install_commands,
list_available_commands,
list_installed_commands,
)
class TestInstallCommands:
def test_install_commands_to_temp_dir(self, tmp_path):
"""Test installing commands to a temporary directory"""
target_dir = tmp_path / "comman... | True | assert | bool_literal | tests/unit/test_cli_install.py | test_install_commands_to_temp_dir | TestInstallCommands | 32 | null |
SuperClaude-Org/SuperClaude_Framework | from superclaude.cli.install_commands import (
install_commands,
list_available_commands,
list_installed_commands,
)
class TestInstallCommands:
def test_install_commands_force_reinstall(self, tmp_path):
"""Test force reinstall of existing commands"""
target_dir = tmp_path / "commands"
... | "modified" | assert | string_literal | tests/unit/test_cli_install.py | test_install_commands_force_reinstall | TestInstallCommands | 68 | null |
SuperClaude-Org/SuperClaude_Framework | import pytest
from superclaude.pm_agent.confidence import ConfidenceChecker
class TestConfidenceChecker:
def test_no_duplicates_check(self):
"""Test duplicate check validation"""
checker = ConfidenceChecker()
# With flag
context_pass = {"duplicate_check_complete": True}
a... | False | assert | bool_literal | tests/unit/test_confidence.py | test_no_duplicates_check | TestConfidenceChecker | 124 | null |
python-jsonschema/jsonschema | from collections import namedtuple
from unittest import TestCase
from jsonschema import ValidationError, _keywords
from jsonschema._types import TypeChecker
from jsonschema.exceptions import UndefinedTypeCheck, UnknownType
from jsonschema.validators import Draft202012Validator, extend
def equals_2(checker, instance):... | "<TypeChecker types={'bar', 'foo'}>") | self.assertEqual | string_literal | jsonschema/tests/test_types.py | test_repr | TestTypeChecker | 110 | null |
python-jsonschema/jsonschema | from unittest import TestCase
from jsonschema import FormatChecker, ValidationError
from jsonschema.exceptions import FormatError
from jsonschema.validators import Draft4Validator
BOOM = ValueError("Boom!")
BANG = ZeroDivisionError("Bang!")
def boom(thing):
if thing == "bang":
raise BANG
raise BOOM
... | "12 is not a 'boom'") | self.assertEqual | string_literal | jsonschema/tests/test_format.py | test_it_catches_registered_errors | TestFormatChecker | 57 | null |
python-jsonschema/jsonschema | from contextlib import contextmanager
from io import BytesIO
from unittest import TestCase, mock
import importlib.metadata
import json
import subprocess
import sys
import urllib.request
import referencing.exceptions
from jsonschema import FormatChecker, exceptions, protocols, validators
class TestDeprecations(TestCa... | __file__) | self.assertEqual | variable | jsonschema/tests/test_deprecations.py | test_version | TestDeprecations | 26 | null |
python-jsonschema/jsonschema | from unittest import TestCase
from jsonschema import FormatChecker, ValidationError
from jsonschema.exceptions import FormatError
from jsonschema.validators import Draft4Validator
BOOM = ValueError("Boom!")
BANG = ZeroDivisionError("Bang!")
def boom(thing):
if thing == "bang":
raise BANG
raise BOOM
... | dict(original, boom=(boom, ()))) | self.assertEqual | func_call | jsonschema/tests/test_format.py | test_it_can_register_cls_checkers | TestFormatChecker | 35 | null |
python-jsonschema/jsonschema | from unittest import TestCase
from jsonschema import FormatChecker, ValidationError
from jsonschema.exceptions import FormatError
from jsonschema.validators import Draft4Validator
BOOM = ValueError("Boom!")
BANG = ZeroDivisionError("Bang!")
def boom(thing):
if thing == "bang":
raise BANG
raise BOOM
... | type(BANG)) | self.assertRaises | func_call | jsonschema/tests/test_format.py | test_it_catches_registered_errors | TestFormatChecker | 60 | null |
python-jsonschema/jsonschema | from contextlib import redirect_stderr, redirect_stdout
from importlib import metadata
from io import StringIO
from json import JSONDecodeError
from pathlib import Path
from textwrap import dedent
from unittest import TestCase
import json
import os
import subprocess
import sys
import tempfile
import warnings
from json... | stdout) | self.assertFalse | variable | jsonschema/tests/test_cli.py | test_instance_is_invalid_JSON_pretty_output | TestCLI | 464 | null |
python-jsonschema/jsonschema | from math import nan
from unittest import TestCase
from jsonschema._utils import equal
class TestListEqual(TestCase):
def test_one_none(self):
list_1 = None
list_2 = []
self.assertFalse( | equal(list_1, list_2)) | self.assertFalse | func_call | jsonschema/tests/test_utils.py | test_one_none | TestListEqual | 124 | null |
python-jsonschema/jsonschema | from collections import namedtuple
from unittest import TestCase
from jsonschema import ValidationError, _keywords
from jsonschema._types import TypeChecker
from jsonschema.exceptions import UndefinedTypeCheck, UnknownType
from jsonschema.validators import Draft202012Validator, extend
def equals_2(checker, instance):... | TypeChecker()) | self.assertEqual | func_call | jsonschema/tests/test_types.py | test_remove | TestTypeChecker | 65 | null |
python-jsonschema/jsonschema | from __future__ import annotations
from collections import deque, namedtuple
from contextlib import contextmanager
from decimal import Decimal
from io import BytesIO
from typing import Any
from unittest import TestCase, mock
from urllib.request import pathname2url
import json
import os
import sys
import tempfile
impor... | e) | self.assertIs | variable | jsonschema/tests/test_validators.py | test_anyOf | TestValidationErrorDetails | 859 | null |
python-jsonschema/jsonschema | from collections import namedtuple
from unittest import TestCase
from jsonschema import ValidationError, _keywords
from jsonschema._types import TypeChecker
from jsonschema.exceptions import UndefinedTypeCheck, UnknownType
from jsonschema.validators import Draft202012Validator, extend
def equals_2(checker, instance):... | KeyError) | self.assertRaises | variable | jsonschema/tests/test_types.py | test_type_check_can_raise_key_error | TestTypeChecker | 103 | null |
python-jsonschema/jsonschema | from __future__ import annotations
from collections import deque, namedtuple
from contextlib import contextmanager
from decimal import Decimal
from io import BytesIO
from typing import Any
from unittest import TestCase, mock
from urllib.request import pathname2url
import json
import os
import sys
import tempfile
impor... | 3) | self.assertEqual | numeric_literal | jsonschema/tests/test_validators.py | test_iter_errors_multiple_errors | TestCreateAndExtend | 109 | null |
python-jsonschema/jsonschema | from __future__ import annotations
from collections import deque, namedtuple
from contextlib import contextmanager
from decimal import Decimal
from io import BytesIO
from typing import Any
from unittest import TestCase, mock
from urllib.request import pathname2url
import json
import os
import sys
import tempfile
impor... | 0) | self.assertEqual | numeric_literal | jsonschema/tests/test_validators.py | test_anyOf | TestValidationErrorDetails | 889 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestErrorTree(TestCase):
def test_it_knows_how_many_total_errors_it_contains(self):
# FIXME: #442
errors = [
exceptions.Validation... | 8) | self.assertEqual | numeric_literal | jsonschema/tests/test_exceptions.py | test_it_knows_how_many_total_errors_it_contains | TestErrorTree | 395 | null |
python-jsonschema/jsonschema | from __future__ import annotations
from collections import deque, namedtuple
from contextlib import contextmanager
from decimal import Decimal
from io import BytesIO
from typing import Any
from unittest import TestCase, mock
from urllib.request import pathname2url
import json
import os
import sys
import tempfile
impor... | 1) | self.assertEqual | numeric_literal | jsonschema/tests/test_validators.py | test_iter_errors_one_error | TestCreateAndExtend | 95 | null |
python-jsonschema/jsonschema | from math import nan
from unittest import TestCase
from jsonschema._utils import equal
class TestDictEqual(TestCase):
def test_equal_dictionaries(self):
dict_1 = {"a": "b", "c": "d"}
dict_2 = {"c": "d", "a": "b"}
self.assertTrue( | equal(dict_1, dict_2)) | self.assertTrue | func_call | jsonschema/tests/test_utils.py | test_equal_dictionaries | TestDictEqual | 19 | null |
python-jsonschema/jsonschema | from collections import namedtuple
from unittest import TestCase
from jsonschema import ValidationError, _keywords
from jsonschema._types import TypeChecker
from jsonschema.exceptions import UndefinedTypeCheck, UnknownType
from jsonschema.validators import Draft202012Validator, extend
def equals_2(checker, instance):... | UndefinedTypeCheck) | self.assertRaises | variable | jsonschema/tests/test_types.py | test_is_unknown_type | TestTypeChecker | 43 | null |
python-jsonschema/jsonschema | from contextlib import redirect_stderr, redirect_stdout
from importlib import metadata
from io import StringIO
from json import JSONDecodeError
from pathlib import Path
from textwrap import dedent
from unittest import TestCase
import json
import os
import subprocess
import sys
import tempfile
import warnings
from json... | exit_code) | self.assertEqual | variable | jsonschema/tests/test_cli.py | run_cli | TestCLI | 85 | null |
python-jsonschema/jsonschema | from collections import namedtuple
from unittest import TestCase
from jsonschema import ValidationError, _keywords
from jsonschema._types import TypeChecker
from jsonschema.exceptions import UndefinedTypeCheck, UnknownType
from jsonschema.validators import Draft202012Validator, extend
def equals_2(checker, instance):... | str(e.exception)) | self.assertIn | func_call | jsonschema/tests/test_types.py | test_is_unknown_type | TestTypeChecker | 45 | null |
python-jsonschema/jsonschema | from contextlib import contextmanager
from io import BytesIO
from unittest import TestCase, mock
import importlib.metadata
import json
import subprocess
import sys
import urllib.request
import referencing.exceptions
from jsonschema import FormatChecker, exceptions, protocols, validators
class TestDeprecations(TestCa... | subtree) | self.assertEqual | variable | jsonschema/tests/test_deprecations.py | test_ErrorTree_setitem | TestDeprecations | 67 | null |
python-jsonschema/jsonschema | from unittest import TestCase
from jsonschema import FormatChecker, ValidationError
from jsonschema.exceptions import FormatError
from jsonschema.validators import Draft4Validator
BOOM = ValueError("Boom!")
BANG = ZeroDivisionError("Bang!")
def boom(thing):
if thing == "bang":
raise BANG
raise BOOM
... | checker.checkers) | self.assertFalse | complex_expr | jsonschema/tests/test_format.py | test_it_can_validate_no_formats | TestFormatChecker | 24 | null |
python-jsonschema/jsonschema | from math import nan
from unittest import TestCase
from jsonschema._utils import equal
class TestDictEqual(TestCase):
def test_same_item(self):
dict_1 = {"a": "b", "c": "d"}
self.assertTrue( | equal(dict_1, dict_1)) | self.assertTrue | func_call | jsonschema/tests/test_utils.py | test_same_item | TestDictEqual | 53 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.