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 |
|---|---|---|---|---|---|---|---|---|---|
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):... | UnknownType) | self.assertRaises | variable | jsonschema/tests/test_types.py | test_unknown_type | TestCustomTypes | 219 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestBestMatch(TestCase):
def best_match_of(self, instance, schema):
errors = list(_LATEST_VERSION(schema).iter_errors(instance))
msg = f"No e... | "array") | self.assertEqual | string_literal | jsonschema/tests/test_exceptions.py | test_if_the_most_relevant_error_is_anyOf_it_is_traversed | TestBestMatch | 73 | 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... | SystemExit) | self.assertRaises | variable | jsonschema/tests/test_cli.py | cli_output_for | TestParser | 857 | 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
... | KeyError) | self.assertRaises | variable | jsonschema/tests/test_format.py | test_it_raises_a_key_error_for_unknown_formats | TestFormatChecker | 27 | 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... | error) | self.assertIn | variable | jsonschema/tests/test_cli.py | test_nonexistent_file_with_explicit_base_uri | TestCLI | 752 | 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
... | "<FormatChecker checkers=['bar', 'baz', 'foo']>") | self.assertEqual | string_literal | jsonschema/tests/test_format.py | test_repr | TestFormatChecker | 88 | 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):... | e.exception.__suppress_context__) | self.assertTrue | complex_expr | jsonschema/tests/test_types.py | test_is_unknown_type | TestTypeChecker | 49 | null |
python-jsonschema/jsonschema | from math import nan
from unittest import TestCase
from jsonschema._utils import equal
class TestEqual(TestCase):
def test_nan(self):
self.assertTrue( | equal(nan, nan)) | self.assertTrue | func_call | jsonschema/tests/test_utils.py | test_nan | TestEqual | 12 | 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... | []) | self.assertEqual | collection | jsonschema/tests/test_validators.py | test_iter_errors_successful | TestCreateAndExtend | 79 | 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... | "") | self.assertEqual | string_literal | jsonschema/tests/test_validators.py | test_it_can_construct_a_base_uri_from_a_schema_without_id | TestRefResolver | 2,416 | 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... | "MIT") | self.assertEqual | string_literal | jsonschema/tests/test_cli.py | test_license | TestCLIIntegration | 885 | 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... | w) | self.assertFalse | variable | jsonschema/tests/test_validators.py | test_does_not_warn_if_meta_schema_is_unspecified | TestValidatorFor | 2,147 | 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(context.exception)) | self.assertIn | func_call | jsonschema/tests/test_types.py | test_remove_unknown_type | TestTypeChecker | 73 | 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):... | (True, False)) | self.assertEqual | collection | jsonschema/tests/test_types.py | test_is_type | TestTypeChecker | 34 | 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... | result) | self.assertFalse | variable | jsonschema/tests/test_deprecations.py | test_Validator_is_valid_two_arguments | TestDeprecations | 146 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestBestMatch(TestCase):
def best_match_of(self, instance, schema):
errors = list(_LATEST_VERSION(schema).iter_errors(instance))
msg = f"No e... | "const") | self.assertEqual | string_literal | jsonschema/tests/test_exceptions.py | test_anyOf_traversal_for_single_sibling_errors | TestBestMatch | 117 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestErrorInitReprStr(TestCase):
def make_error(self, **kwargs):
defaults = dict(
message="hello",
validator="type",
... | 1) | self.assertGreater | numeric_literal | jsonschema/tests/test_exceptions.py | test_it_calls_super_and_sets_args | TestErrorInitReprStr | 532 | 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... | 2) | self.assertEqual | numeric_literal | jsonschema/tests/test_validators.py | test_anyOf | TestValidationErrorDetails | 851 | 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... | SchemaError) | self.assertRaises | variable | jsonschema/tests/test_cli.py | test_invalid_schema_pretty_output | TestCLI | 316 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestBestMatch(TestCase):
def best_match_of(self, instance, schema):
errors = list(_LATEST_VERSION(schema).iter_errors(instance))
msg = f"No e... | errors) | self.assertTrue | variable | jsonschema/tests/test_exceptions.py | best_match_of | TestBestMatch | 14 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestByRelevance(TestCase):
def test_strong_keywords_are_higher_priority(self):
weak = exceptions.ValidationError("Oh no!", path=[], validator="a")
... | strong) | self.assertIs | variable | jsonschema/tests/test_exceptions.py | test_strong_keywords_are_higher_priority | TestByRelevance | 381 | null |
python-jsonschema/jsonschema | from unittest import TestCase
import textwrap
import jsonpath_ng
from jsonschema import exceptions
from jsonschema.validators import _LATEST_VERSION
class TestByRelevance(TestCase):
def test_weak_keywords_are_lower_priority(self):
weak = exceptions.ValidationError("Oh no!", path=[], validator="a")
... | normal) | self.assertIs | variable | jsonschema/tests/test_exceptions.py | test_weak_keywords_are_lower_priority | TestByRelevance | 368 | 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().redefine("two", equals_2)) | self.assertEqual | func_call | jsonschema/tests/test_types.py | test_checks_can_be_added_at_init | TestTypeChecker | 56 | 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... | 12) | self.assertEqual | numeric_literal | jsonschema/tests/test_validators.py | test_evolve_with_subclass | ValidatorTestMixin | 1,714 | 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):... | error) | self.assertIs | variable | jsonschema/tests/test_types.py | test_type_check_can_raise_key_error | TestTypeChecker | 106 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_missing_sections_get_defaults(self) -> None:
"""Test that missing sections get appropriate defaults."""
with tempfile.NamedTemporaryFi... | []) | self.assertEqual | collection | tests/integration/test_interpreter.py | test_missing_sections_get_defaults | TestZ3JSONInterpreter | 74 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_unknown_action_logs_warning(self) -> None:
"""Test that unknown action logs warning."""
with tempfile.NamedTemporaryFile(mode="w", suf... | any("Unknown action" in msg for msg in cm.output)) | self.assertTrue | func_call | tests/integration/test_interpreter.py | test_unknown_action_logs_warning | TestZ3JSONInterpreter | 104 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_missing_sections_get_defaults(self) -> None:
"""Test that missing sections get appropriate defaults."""
with tempfile.NamedTemporaryFi... | interpreter.config) | self.assertIn | complex_expr | tests/integration/test_interpreter.py | test_missing_sections_get_defaults | TestZ3JSONInterpreter | 72 | null |
DebarghaG/proofofthought | import ast
import json
import tempfile
import unittest
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.dsl.sorts import SortManager
from z3adapter.interpreter import Z3JSONInterpreter
from z3adapter.security.validator import ExpressionValidator
class TestBugFixes(u... | ValueError) | self.assertRaises | variable | tests/integration/test_bug_fixes.py | test_bug5_security_sandbox_ast_based | TestBugFixes | 61 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_builtin_sorts_initialized(self) -> None:
... | IntSort()) | self.assertEqual | func_call | tests/unit/test_sort_manager.py | test_builtin_sorts_initialized | TestSortManager | 22 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, Function, IntSort
from z3adapter.dsl.expressions import ExpressionParser
class TestExpressionParser(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.functions: dict[str, Any] = {}
self.con... | ValueError) | self.assertRaises | variable | tests/unit/test_expression_parser.py | test_parse_expression_with_invalid_syntax | TestExpressionParser | 84 | null |
DebarghaG/proofofthought | import ast
import json
import tempfile
import unittest
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.dsl.sorts import SortManager
from z3adapter.interpreter import Z3JSONInterpreter
from z3adapter.security.validator import ExpressionValidator
class TestBugFixes(u... | parser._context_cache) | self.assertIsNone | complex_expr | tests/integration/test_bug_fixes.py | test_bug3_context_cache_timing_fixed | TestBugFixes | 38 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_create_bitvec_sort_zero_size(self) -> Non... | str(ctx.exception)) | self.assertIn | func_call | tests/unit/test_sort_manager.py | test_create_bitvec_sort_zero_size | TestSortManager | 59 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_create_functions(self) -> None:
"... | functions) | self.assertIn | variable | tests/unit/test_sort_manager.py | test_create_functions | TestSortManager | 142 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_safe_eval_allows_normal_attribute_access(self) -> None:
"""Test that normal attribute access is allowed."""
class Obj:
value = 42
... | 42) | self.assertEqual | numeric_literal | tests/unit/test_security_validator.py | test_safe_eval_allows_normal_attribute_access | TestExpressionValidator | 134 | null |
DebarghaG/proofofthought | import ast
import json
import tempfile
import unittest
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.dsl.sorts import SortManager
from z3adapter.interpreter import Z3JSONInterpreter
from z3adapter.security.validator import ExpressionValidator
class TestBugFixes(u... | "my_const") | self.assertEqual | string_literal | tests/integration/test_bug_fixes.py | test_bug8_constants_dict_semantics_fixed | TestBugFixes | 113 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_load_invalid_json(self) -> None:
"""Test that loading invalid JSON raises JSONDecodeError."""
with tempfile.NamedTemporaryFile(mode="w... | json.JSONDecodeError) | self.assertRaises | complex_expr | tests/integration/test_interpreter.py | test_load_invalid_json | TestZ3JSONInterpreter | 50 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_check_safe_ast_blocks_import(self) -> None:
"""Test that import statements are blocked."""
# This will fail to parse in eval mode, but test Import nod... | SyntaxError) | self.assertRaises | variable | tests/unit/test_security_validator.py | test_check_safe_ast_blocks_import | TestExpressionValidator | 39 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_builtin_sorts_initialized(self) -> None:
... | BoolSort()) | self.assertEqual | func_call | tests/unit/test_sort_manager.py | test_builtin_sorts_initialized | TestSortManager | 23 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | str(ctx.exception)) | self.assertIn | func_call | tests/unit/test_verifier.py | test_add_verification_empty_exists_raises_error | TestVerifier | 60 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | any("SAT" in msg for msg in cm.output)) | self.assertTrue | func_call | tests/unit/test_verifier.py | test_verify_conditions_sat | TestVerifier | 99 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | self.verifier.verifications) | self.assertIn | complex_expr | tests/unit/test_verifier.py | test_add_verification_simple_constraint | TestVerifier | 29 | null |
DebarghaG/proofofthought | import ast
import json
import tempfile
import unittest
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.dsl.sorts import SortManager
from z3adapter.interpreter import Z3JSONInterpreter
from z3adapter.security.validator import ExpressionValidator
class TestBugFixes(u... | content) | self.assertNotIn | variable | tests/integration/test_bug_fixes.py | test_bug1_wildcard_import_fixed | TestBugFixes | 24 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | ValueError) | self.assertRaises | variable | tests/unit/test_verifier.py | test_add_verification_empty_exists_raises_error | TestVerifier | 58 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_create_variables(self) -> None:
"... | variables) | self.assertIn | variable | tests/unit/test_sort_manager.py | test_create_variables | TestSortManager | 178 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.optimization.optimizer import OptimizerRunner
class TestOptimizerRunner(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sorts =... | any("No optimization section" in msg for msg in cm.output)) | self.assertTrue | func_call | tests/unit/test_optimizer.py | test_optimize_no_config | TestOptimizerRunner | 28 | null |
DebarghaG/proofofthought | import unittest
from z3 import BoolSort, IntSort, RealSort, is_sort
from z3adapter.dsl.sorts import SortManager
class TestSortManager(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sort_manager = SortManager()
def test_create_bitvec_sort_zero_size(self) -> Non... | ValueError) | self.assertRaises | variable | tests/unit/test_sort_manager.py | test_create_bitvec_sort_zero_size | TestSortManager | 57 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_safe_eval_uses_safe_globals(self) -> None:
"""Test that safe globals are accessible."""
from z3 import And, BoolVal
expr = "And(a, b)"
... | result) | self.assertIsNotNone | variable | tests/unit/test_security_validator.py | test_safe_eval_uses_safe_globals | TestExpressionValidator | 95 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.optimization.optimizer import OptimizerRunner
class TestOptimizerRunner(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.sorts =... | str(e).lower()) | self.assertNotIn | func_call | tests/unit/test_optimizer.py | test_optimize_references_global_constants | TestOptimizerRunner | 76 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, Function, IntSort
from z3adapter.dsl.expressions import ExpressionParser
class TestExpressionParser(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.functions: dict[str, Any] = {}
self.con... | context2) | self.assertIn | variable | tests/unit/test_expression_parser.py | test_build_context_with_symbols_loaded | TestExpressionParser | 63 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_load_nonexistent_file(self) -> None:
"""Test that loading nonexistent file raises FileNotFoundError."""
with self.assertRaises( | FileNotFoundError) | self.assertRaises | variable | tests/integration/test_interpreter.py | test_load_nonexistent_file | TestZ3JSONInterpreter | 40 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_invalid_constants_section_structure(self) -> None:
"""Test that invalid constants structure is corrected."""
with tempfile.NamedTempor... | {}) | self.assertEqual | collection | tests/integration/test_interpreter.py | test_invalid_constants_section_structure | TestZ3JSONInterpreter | 90 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_safe_eval_uses_context(self) -> None:
"""Test that context variables are accessible."""
expr = "x + y"
context = {"x": 10, "y": 20}
re... | 30) | self.assertEqual | numeric_literal | tests/unit/test_security_validator.py | test_safe_eval_uses_context | TestExpressionValidator | 85 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_verify_conditions_action(self) -> None:
"""Test that verify_conditions action works."""
config = {
"constants": {"nums": {... | output) | self.assertIn | variable | tests/integration/test_interpreter.py | test_verify_conditions_action | TestZ3JSONInterpreter | 126 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | any("No verifications" in msg for msg in cm.output)) | self.assertTrue | func_call | tests/unit/test_verifier.py | test_verify_conditions_no_verifications | TestVerifier | 118 | null |
DebarghaG/proofofthought | import json
import os
import tempfile
import unittest
from z3adapter.interpreter import Z3JSONInterpreter
class TestZ3JSONInterpreter(unittest.TestCase):
def test_custom_timeouts(self) -> None:
"""Test that custom timeouts are respected."""
interpreter = Z3JSONInterpreter(
"tests/fixt... | 5000) | self.assertEqual | numeric_literal | tests/integration/test_interpreter.py | test_custom_timeouts | TestZ3JSONInterpreter | 60 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, Function, IntSort
from z3adapter.dsl.expressions import ExpressionParser
class TestExpressionParser(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.functions: dict[str, Any] = {}
self.con... | context1) | self.assertIn | variable | tests/unit/test_expression_parser.py | test_build_context_with_symbols_loaded | TestExpressionParser | 62 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, Function, IntSort
from z3adapter.dsl.expressions import ExpressionParser
class TestExpressionParser(unittest.TestCase):
def setUp(self) -> None:
"""Set up test fixtures."""
self.functions: dict[str, Any] = {}
self.con... | context) | self.assertIn | variable | tests/unit/test_expression_parser.py | test_build_context_without_symbols_loaded | TestExpressionParser | 51 | null |
DebarghaG/proofofthought | import unittest
from typing import Any
from z3 import BoolSort, Const, IntSort
from z3adapter.dsl.expressions import ExpressionParser
from z3adapter.solvers.z3_solver import Z3Solver
from z3adapter.verification.verifier import Verifier
class TestVerifier(unittest.TestCase):
def setUp(self) -> None:
"""S... | any("UNSAT" in msg for msg in cm.output)) | self.assertTrue | func_call | tests/unit/test_verifier.py | test_verify_conditions_unsat | TestVerifier | 111 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_check_safe_ast_blocks_dunder_attributes(self) -> None:
"""Test that dunder attribute access is blocked."""
expr = "obj.__class__"
tree = ast.p... | str(ctx.exception)) | self.assertIn | func_call | tests/unit/test_security_validator.py | test_check_safe_ast_blocks_dunder_attributes | TestExpressionValidator | 25 | null |
DebarghaG/proofofthought | import ast
import unittest
from z3adapter.security.validator import ExpressionValidator
class TestExpressionValidator(unittest.TestCase):
def test_check_safe_ast_blocks_dunder_attributes(self) -> None:
"""Test that dunder attribute access is blocked."""
expr = "obj.__class__"
tree = ast.p... | ValueError) | self.assertRaises | variable | tests/unit/test_security_validator.py | test_check_safe_ast_blocks_dunder_attributes | TestExpressionValidator | 23 | null |
dylanljones/pyrekordbox | import os
import shutil
import tempfile
from datetime import datetime, timezone
from pathlib import Path
import pytest
from pytest import mark
from sqlalchemy import text
from sqlalchemy.orm.query import Query
from pyrekordbox import MasterDatabase
from pyrekordbox.masterdb import models
from pyrekordbox.masterdb.mod... | 1 | assert | numeric_literal | tests/test_masterdb.py | test_add_song_to_playlist | 332 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox.mysettings import (
DjmMySettingFile,
MySetting2File,
MySettingFile,
read_mysetting_file,
)
from pyrekordbox.mysettings.file import compute_checksum
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
MYSETTING_KEYS = [
"on_a... | expected | assert | variable | tests/test_mysetting.py | test_get_mysetting | 101 | null | |
dylanljones/pyrekordbox | import os
import shutil
import tempfile
from datetime import datetime, timezone
from pathlib import Path
import pytest
from pytest import mark
from sqlalchemy import text
from sqlalchemy.orm.query import Query
from pyrekordbox import MasterDatabase
from pyrekordbox.masterdb import models
from pyrekordbox.masterdb.mod... | 2 | assert | numeric_literal | tests/test_masterdb.py | test_add_song_to_playlist_trackno_end | 357 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox.mysettings import (
DjmMySettingFile,
MySetting2File,
MySettingFile,
read_mysetting_file,
)
from pyrekordbox.mysettings.file import compute_checksum
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
MYSETTING_KEYS = [
"on_a... | file_default[key] | assert | complex_expr | tests/test_mysetting.py | test_mysetting_defaults | 108 | null | |
dylanljones/pyrekordbox | import os
import shutil
import tempfile
from datetime import datetime, timezone
from pathlib import Path
import pytest
from pytest import mark
from sqlalchemy import text
from sqlalchemy.orm.query import Query
from pyrekordbox import MasterDatabase
from pyrekordbox.masterdb import models
from pyrekordbox.masterdb.mod... | 0 | assert | numeric_literal | tests/test_masterdb.py | test_create_playlist | 532 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | 1 | assert | numeric_literal | tests/test_anlz.py | test_anlzfile_getall_tags | 189 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | bpms) | assert_* | variable | tests/test_anlz.py | test_pqtz_tag_set_bpms | 79 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox.mysettings import (
DjmMySettingFile,
MySetting2File,
MySettingFile,
read_mysetting_file,
)
from pyrekordbox.mysettings.file import compute_checksum
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
MYSETTING_KEYS = [
"on_a... | file_ref.build() | assert | func_call | tests/test_mysetting.py | test_set_mysetting | 123 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox.mysettings import (
DjmMySettingFile,
MySetting2File,
MySettingFile,
read_mysetting_file,
)
from pyrekordbox.mysettings.file import compute_checksum
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
MYSETTING_KEYS = [
"on_a... | sett.parsed.checksum | assert | complex_expr | tests/test_mysetting.py | test_mysetting_checksum | 205 | null | |
dylanljones/pyrekordbox | import json
import sys
from pathlib import Path
import pytest
from pyrekordbox.config import get_config, update_config
RB_SETTING = """<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES><VALUE name="masterDbDirectory" val="{db_dir}"/></PROPERTIES>
"""
RB_OPTIONS = {"options": [["db-path", ""]]}
def mock_rekordbox_... | pioneer_app_dir | assert | variable | tests/test_config.py | test_pioneer_config | 94 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox.mysettings import (
DjmMySettingFile,
MySetting2File,
MySettingFile,
read_mysetting_file,
)
from pyrekordbox.mysettings.file import compute_checksum
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
MYSETTING_KEYS = [
"on_a... | file_ref[key] | assert | complex_expr | tests/test_mysetting.py | test_set_mysetting | 121 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | extected | assert | variable | tests/test_anlz.py | test_ppth_tag_setters | 126 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | beats) | assert_* | variable | tests/test_anlz.py | test_pqtz_tag_set_beats | 69 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox import RekordboxXml
from pyrekordbox.rbxml import Node, PositionMark, Tempo, XmlDuplicateError
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
XML5 = os.path.join(TEST_ROOT, "rekordbox 5", "database.xml")
XML6 = os.path.join(TEST_ROOT, "rekor... | 1 | assert | numeric_literal | tests/test_xml.py | test_add_track | 470 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox import RekordboxXml
from pyrekordbox.rbxml import Node, PositionMark, Tempo, XmlDuplicateError
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
XML5 = os.path.join(TEST_ROOT, "rekordbox 5", "database.xml")
XML6 = os.path.join(TEST_ROOT, "rekor... | 0 | assert | numeric_literal | tests/test_xml.py | test_update_track_count | 507 | null | |
dylanljones/pyrekordbox | import os
import shutil
import tempfile
from datetime import datetime, timezone
from pathlib import Path
import pytest
from pytest import mark
from sqlalchemy import text
from sqlalchemy.orm.query import Query
from pyrekordbox import MasterDatabase
from pyrekordbox.masterdb import models
from pyrekordbox.masterdb.mod... | 3 | assert | numeric_literal | tests/test_masterdb.py | test_add_song_to_playlist_trackno_end | 358 | null | |
dylanljones/pyrekordbox | import json
import sys
from pathlib import Path
import pytest
from pyrekordbox.config import get_config, update_config
RB_SETTING = """<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES><VALUE name="masterDbDirectory" val="{db_dir}"/></PROPERTIES>
"""
RB_OPTIONS = {"options": [["db-path", ""]]}
def mock_rekordbox_... | pioneer_app_dir / "rekordbox" | assert | complex_expr | tests/test_config.py | test_rb5_config | 113 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | len(times) | assert | func_call | tests/test_anlz.py | test_pqtz_tag_getters | 51 | null | |
dylanljones/pyrekordbox | import os
import pytest
from pyrekordbox import RekordboxXml
from pyrekordbox.rbxml import Node, PositionMark, Tempo, XmlDuplicateError
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
XML5 = os.path.join(TEST_ROOT, "rekordbox 5", "database.xml")
XML6 = os.path.join(TEST_ROOT, "rekor... | 2 | assert | numeric_literal | tests/test_xml.py | test_add_track | 476 | null | |
dylanljones/pyrekordbox | import json
import sys
from pathlib import Path
import pytest
from pyrekordbox.config import get_config, update_config
RB_SETTING = """<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES><VALUE name="masterDbDirectory" val="{db_dir}"/></PROPERTIES>
"""
RB_OPTIONS = {"options": [["db-path", ""]]}
def mock_rekordbox_... | pioneer_install_dir | assert | variable | tests/test_config.py | test_pioneer_config | 93 | null | |
dylanljones/pyrekordbox | import json
import sys
from pathlib import Path
import pytest
from pyrekordbox.config import get_config, update_config
RB_SETTING = """<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES><VALUE name="masterDbDirectory" val="{db_dir}"/></PROPERTIES>
"""
RB_OPTIONS = {"options": [["db-path", ""]]}
def mock_rekordbox_... | expected_version | assert | variable | tests/test_config.py | test_rb5_config | 116 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | tag.get() | assert | func_call | tests/test_anlz.py | test_anlzfile_get | 198 | null | |
dylanljones/pyrekordbox | import os
import numpy as np
import pytest
from numpy.testing import assert_equal
from pyrekordbox import anlz
TEST_ROOT = os.path.join(os.path.dirname(os.path.dirname(__file__)), ".testdata")
ANLZ_ROOT = os.path.join(TEST_ROOT, "export", "PIONEER", "USBANLZ")
ANLZ_DIRS = list(anlz.walk_anlz_paths(ANLZ_ROOT))
ANLZ_F... | len(colors) | assert | func_call | tests/test_anlz.py | test_pwv4_tag_getters | 168 | null | |
dylanljones/pyrekordbox | import json
import sys
from pathlib import Path
import pytest
from pyrekordbox.config import get_config, update_config
RB_SETTING = """<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES><VALUE name="masterDbDirectory" val="{db_dir}"/></PROPERTIES>
"""
RB_OPTIONS = {"options": [["db-path", ""]]}
def mock_rekordbox_... | pioneer_app_dir / "rekordbox6" | assert | complex_expr | tests/test_config.py | test_rb6_config | 136 | null | |
commaai/laika | import numpy as np
import unittest
from laika.gps_time import GPSTime, TimeSyncer, gpst_to_utc, utc_to_gpst
from datetime import datetime
datetimes_strings = ['1985-10-10 19:27:01',
'2002-04-27 22:22:06',
'1986-01-03 06:30:57',
'2019-09-15 19:30:33',
'2005-12-06 14:54:22',
'200... | delta_sec_minus_gps) | assert_* | variable | tests/test_time.py | test_gps_time_subtraction_addition | TestTime | 67 | null |
commaai/laika | import unittest
import numpy as np
from laika.raw_gnss import get_DOP, get_PDOP, get_HDOP, get_VDOP, get_TDOP
from laika.lib.coordinates import geodetic2ecef
class TestDOP(unittest.TestCase):
def setUp(self):
self.receiver = geodetic2ecef((0, 0, 0))
self.satellites = np.array([
[18935913, -3082759, ... | 0.8442153787485294) | self.assertAlmostEqual | numeric_literal | tests/test_dop.py | test_TDOP | TestDOP | 38 | null |
commaai/laika | import numpy as np
import unittest
from laika.gps_time import GPSTime, TimeSyncer, gpst_to_utc, utc_to_gpst
from datetime import datetime
datetimes_strings = ['1985-10-10 19:27:01',
'2002-04-27 22:22:06',
'1986-01-03 06:30:57',
'2019-09-15 19:30:33',
'2005-12-06 14:54:22',
'200... | 16) | assert_* | numeric_literal | tests/test_time.py | test_utc_converter | TestTime | 94 | null |
commaai/laika | import numpy as np
from tqdm.auto import tqdm
import unittest
from laika import AstroDog
from shutil import copyfile
import os
from datetime import datetime
from laika.gps_time import GPSTime
from laika.downloader import download_cors_station
from laika.rinex_file import RINEXFile
from laika.dgps import get_station_pos... | sc01_exact_position) | assert_* | variable | tests/test_positioning.py | run_station_position | TestPositioning | 61 | null |
commaai/laika | import unittest
import numpy as np
from laika.raw_gnss import get_DOP, get_PDOP, get_HDOP, get_VDOP, get_TDOP
from laika.lib.coordinates import geodetic2ecef
class TestDOP(unittest.TestCase):
def setUp(self):
self.receiver = geodetic2ecef((0, 0, 0))
self.satellites = np.array([
[18935913, -3082759, ... | 1.3418910470124197) | self.assertAlmostEqual | numeric_literal | tests/test_dop.py | test_HDOP | TestDOP | 26 | null |
commaai/laika | import os
import unittest
from dataclasses import dataclass
from itertools import product
from unittest.mock import patch
from parameterized import parameterized
from laika.downloader import download_and_cache_file, download_file, DownloadFailed
class TestDownloader(unittest.TestCase):
files = [
TestFile(
... | DownloadFailed) | self.assertRaises | variable | tests/test_downloader.py | test_write_attempt_file_on_error | TestDownloader | 98 | null |
commaai/laika | import unittest
import numpy as np
from laika.raw_gnss import get_DOP, get_PDOP, get_HDOP, get_VDOP, get_TDOP
from laika.lib.coordinates import geodetic2ecef
class TestDOP(unittest.TestCase):
def setUp(self):
self.receiver = geodetic2ecef((0, 0, 0))
self.satellites = np.array([
[18935913, -3082759, ... | 2.352329857908973) | self.assertAlmostEqual | numeric_literal | tests/test_dop.py | test_GDOP | TestDOP | 22 | null |
commaai/laika | import numpy as np
import unittest
from laika.gps_time import GPSTime, TimeSyncer, gpst_to_utc, utc_to_gpst
from datetime import datetime
datetimes_strings = ['1985-10-10 19:27:01',
'2002-04-27 22:22:06',
'1986-01-03 06:30:57',
'2019-09-15 19:30:33',
'2005-12-06 14:54:22',
'200... | delta_sec) | assert_* | variable | tests/test_time.py | test_gps_time_dt_conversion | TestTime | 37 | null |
commaai/laika | import unittest
import time
from laika.ephemeris import EphemerisType
from laika.gps_time import GPSTime
from laika import AstroDog
gps_times_list = [[2350, 415621.0]]
svIds = ['R345'] # fake satellite id
gps_times = [GPSTime(*gps_time_list) for gps_time_list in gps_times_list]
class TestFailCache(unittest.TestCase... | time.time() - t0 < 10) | self.assertTrue | func_call | tests/test_fail_caching.py | test_no_infinite_pulls | TestFailCache | 23 | null |
commaai/laika | import numpy as np
import unittest
from laika.ephemeris import EphemerisType, read_prn_data
from laika.gps_time import GPSTime
from laika import AstroDog
gps_times_list = [[2300, 415621.0],
[2330, 455457.0],
[2360, 443787.0]]
svIds = ['G07', 'G31', 'R08']
gps_times = [GPSTime(*gp... | len(ephems)) | self.assertEqual | func_call | tests/test_ephemerides.py | test_read_prn_data | TestAstroDog | 62 | null |
commaai/laika | import unittest
import numpy as np
from laika.raw_gnss import get_DOP, get_PDOP, get_HDOP, get_VDOP, get_TDOP
from laika.lib.coordinates import geodetic2ecef
class TestDOP(unittest.TestCase):
def setUp(self):
self.receiver = geodetic2ecef((0, 0, 0))
self.satellites = np.array([
[18935913, -3082759, ... | 2.195622042769321) | self.assertAlmostEqual | numeric_literal | tests/test_dop.py | test_PDOP | TestDOP | 34 | null |
commaai/laika | import unittest
from laika.helpers import get_constellation, get_nmea_id_from_prn, get_prn_from_nmea_id
from laika.helpers import ConstellationId
MAIN_CONSTELLATIONS = [
['G01', 1],
['G10', 10],
['G32', 32],
['S01', 33],
['S02', 34],
['S10', 42],
['S22', 54],
['S23', 55],
['S32', ... | ValueError) | self.assertRaises | variable | tests/test_prns.py | test_nmea_id_from_invalid_prn | TestConstellationPRN | 95 | null |
commaai/laika | import os
import unittest
from dataclasses import dataclass
from itertools import product
from unittest.mock import patch
from parameterized import parameterized
from laika.downloader import download_and_cache_file, download_file, DownloadFailed
class TestDownloader(unittest.TestCase):
files = [
TestFile(
... | success) | self.assertTrue | variable | tests/test_downloader.py | test_all_download_protocols | TestDownloader | 74 | null |
commaai/laika | import numpy as np
import unittest
from laika.gps_time import GPSTime, TimeSyncer, gpst_to_utc, utc_to_gpst
from datetime import datetime
datetimes_strings = ['1985-10-10 19:27:01',
'2002-04-27 22:22:06',
'1986-01-03 06:30:57',
'2019-09-15 19:30:33',
'2005-12-06 14:54:22',
'200... | gps_time.week) | assert_* | complex_expr | tests/test_time.py | test_gps_time_week_rollover | TestTime | 53 | null |
commaai/laika | from datetime import datetime
import unittest
from laika import AstroDog
from laika.constants import SECS_IN_HR
from laika.ephemeris import EphemerisType
from laika.gps_time import GPSTime
from laika.helpers import ConstellationId
class TestPredictionOrbits(unittest.TestCase):
def test_gps(self):
available_dat... | available_date in dog.orbit_fetched_times) | self.assertTrue | complex_expr | tests/test_prediction_orbits.py | test_gps | TestPredictionOrbits | 17 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.