Conghao97's picture tcftrees's picture
ProgramGen release
d086025
Raw History Blame Contribute Delete
24.4 kB
{
"passed_ptp": [
"tests/test_inherit_dicts.py::test_empty",
"tests/test_inherit_dicts.py::test_one_dict",
"tests/test_inherit_dicts.py::test_two_dicts",
"tests/test_inherit_dicts.py::test_removal",
"tests/test_inherit_dicts.py::test_persists",
"tests/test_inherit_dicts.py::test_nonexisting",
"tests/test_inherit_dicts.py::test_as_a_whole",
"tests/test_inheritance.py::test_no_inheritance",
"tests/test_inheritance.py::test_single_inheritance",
"tests/test_inheritance.py::test_multiple_inheritance",
"tests/test_inheritance.py::test_diamond_inheritance",
"tests/test_inheritance.py::test_ex5_from_c3_switch",
"tests/test_inheritance.py::test_monotonicity",
"tests/test_inheritance.py::test_consistency_with_epg",
"tests/test_inheritance.py::test_mro_disagreement",
"tests/test_inheritance.py::test_is_type",
"tests/test_inheritance.py::test_is_subclass",
"tests/test_inheritance.py::test_is_subclass_tuple",
"tests/test_normalize_ast.py::test_visit_Num",
"tests/test_normalize_ast.py::test_visit_Str",
"tests/test_normalize_ast.py::test_visit_Bytes",
"tests/test_normalize_ast.py::test_visit_NameConstant",
"tests/test_normalize_ast.py::test_visit_Ellipsis",
"tests/test_normalize_ast.py::test_visit_Index",
"tests/test_normalize_ast.py::test_visit_ExtSlice",
"tests/test_normalize_ast.py::test_normalize_ast_Num",
"tests/test_normalize_ast.py::test_normalize_ast_Str",
"tests/test_normalize_ast.py::test_normalize_ast_Bytes",
"tests/test_normalize_ast.py::test_normalize_ast_NameConstant",
"tests/test_normalize_ast.py::test_normalize_ast_Ellipsis",
"tests/test_normalize_ast.py::test_normalize_ast_Index",
"tests/test_normalize_ast.py::test_normalize_ast_ExtSlice",
"tests/test_structure_types.py::test_int_binop",
"tests/test_structure_types.py::test_int_cmp",
"tests/test_structure_types.py::test_float_binop",
"tests/test_structure_types.py::test_sequence",
"tests/test_structure_types.py::test_list",
"tests/test_structure_types.py::test_tuple"
],
"test_files": [
"tests/_test_acr_translator.py",
"tests/test_inherit_dicts.py",
"tests/test_inheritance.py",
"tests/test_normalize_ast.py",
"tests/test_structure_types.py",
"tests/utils.py"
],
"test_command": [
"bash",
"-lc",
"set -uo pipefail\nrun=(python3 -m pytest -vv --continue-on-collection-errors -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py)\nif [ -n \"${COVERAGE_FILE:-}\" ]; then run=(python3 -m coverage run --source=. -m pytest -vv --continue-on-collection-errors -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py); fi\ncollect=(python3 -m pytest -q -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py)\ncollected_output=$(\"${collect[@]}\" --collect-only)\ncollect_rc=$?\nif [ \"$collect_rc\" -ne 0 ] && [ \"$collect_rc\" -ne 5 ]; then\n printf \"%s\\n\" \"$collected_output\" >&2\n printf \"[programgen] test collection failed with exit code %s\\n\" \"$collect_rc\" >&2\n exit \"$collect_rc\"\nfi\nmapfile -t collected < <(printf \"%s\\n\" \"$collected_output\" | sed -n '/::/p' | sed 's/[[:space:]]*$//')\nif [ \"${#collected[@]}\" -gt 500 ]; then\n while IFS= read -r id; do run+=(\"--deselect=$id\"); done < <(printf \"%s\\n\" \"${collected[@]}\" | awk -F'::' -v limit=500 '{f=$1; n[f]++; idx[f,n[f]]=NR; all[NR]=$0; if(!(f in seen)){seen[f]=1; order[++m]=f}} END{d=1; c=0; while(c<limit){a=0; for(i=1;i<=m;i++){f=order[i]; if(d<=n[f]){keep[idx[f,d]]=1; c++; a=1; if(c>=limit) break}} if(!a) break; d++} for(r=1;r<=NR;r++) if(!(r in keep)) print all[r]}')\nfi\n\"${run[@]}\"; exit $?"
],
"test_payload_contract": {
"schema_version": "programgen.test-payload-contract.v1",
"test_files": [
"tests/_test_acr_translator.py",
"tests/test_inherit_dicts.py",
"tests/test_inheritance.py",
"tests/test_normalize_ast.py",
"tests/test_structure_types.py",
"tests/utils.py"
],
"test_command": [
"bash",
"-lc",
"set -uo pipefail\nrun=(python3 -m pytest -vv --continue-on-collection-errors -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py)\nif [ -n \"${COVERAGE_FILE:-}\" ]; then run=(python3 -m coverage run --source=. -m pytest -vv --continue-on-collection-errors -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py); fi\ncollect=(python3 -m pytest -q -o addopts= tests/test_inherit_dicts.py tests/test_inheritance.py tests/test_normalize_ast.py tests/test_structure_types.py)\ncollected_output=$(\"${collect[@]}\" --collect-only)\ncollect_rc=$?\nif [ \"$collect_rc\" -ne 0 ] && [ \"$collect_rc\" -ne 5 ]; then\n printf \"%s\\n\" \"$collected_output\" >&2\n printf \"[programgen] test collection failed with exit code %s\\n\" \"$collect_rc\" >&2\n exit \"$collect_rc\"\nfi\nmapfile -t collected < <(printf \"%s\\n\" \"$collected_output\" | sed -n '/::/p' | sed 's/[[:space:]]*$//')\nif [ \"${#collected[@]}\" -gt 500 ]; then\n while IFS= read -r id; do run+=(\"--deselect=$id\"); done < <(printf \"%s\\n\" \"${collected[@]}\" | awk -F'::' -v limit=500 '{f=$1; n[f]++; idx[f,n[f]]=NR; all[NR]=$0; if(!(f in seen)){seen[f]=1; order[++m]=f}} END{d=1; c=0; while(c<limit){a=0; for(i=1;i<=m;i++){f=order[i]; if(d<=n[f]){keep[idx[f,d]]=1; c++; a=1; if(c>=limit) break}} if(!a) break; d++} for(r=1;r<=NR;r++) if(!(r in keep)) print all[r]}')\nfi\n\"${run[@]}\"; exit $?"
],
"text_fixtures": [],
"binary_fixtures": [],
"nonportable_absolute_paths": [],
"required_external_commands": [],
"declared_console_scripts": [],
"unresolved_external_commands": []
},
"unit_test": [
"tests.test_inherit_dicts::test_empty",
"tests.test_inherit_dicts::test_one_dict",
"tests.test_inherit_dicts::test_two_dicts",
"tests.test_inherit_dicts::test_removal",
"tests.test_inherit_dicts::test_persists",
"tests.test_inherit_dicts::test_nonexisting",
"tests.test_inherit_dicts::test_as_a_whole",
"tests.test_inheritance::test_no_inheritance",
"tests.test_inheritance::test_single_inheritance",
"tests.test_inheritance::test_multiple_inheritance",
"tests.test_inheritance::test_diamond_inheritance",
"tests.test_inheritance::test_ex5_from_c3_switch",
"tests.test_inheritance::test_monotonicity",
"tests.test_inheritance::test_consistency_with_epg",
"tests.test_inheritance::test_mro_disagreement",
"tests.test_inheritance::test_is_type",
"tests.test_inheritance::test_is_subclass",
"tests.test_inheritance::test_is_subclass_tuple",
"tests.test_normalize_ast::test_visit_Str",
"tests.test_normalize_ast::test_visit_Bytes",
"tests.test_normalize_ast::test_visit_NameConstant",
"tests.test_normalize_ast::test_visit_Ellipsis",
"tests.test_normalize_ast::test_normalize_ast_Num",
"tests.test_normalize_ast::test_normalize_ast_Str",
"tests.test_normalize_ast::test_normalize_ast_Bytes",
"tests.test_normalize_ast::test_normalize_ast_NameConstant",
"tests.test_normalize_ast::test_normalize_ast_Ellipsis",
"tests.test_normalize_ast::test_normalize_ast_Index",
"tests.test_normalize_ast::test_normalize_ast_ExtSlice",
"tests.test_structure_types::test_int_binop",
"tests.test_structure_types::test_int_cmp",
"tests.test_structure_types::test_float_binop",
"tests.test_structure_types::test_sequence",
"tests.test_structure_types::test_list",
"tests.test_structure_types::test_tuple"
],
"expected_test_count": 38,
"measured_test_count": 38,
"enumerated_test_count": 35,
"test_count_source": "measured-suite",
"python_install_contract": {
"strategy": "editable-install",
"project_root": ".",
"package_roots": [
"."
],
"build_backend": "setuptools.build_meta",
"build_system_requires": [
"setuptools>=61.2",
"wheel"
],
"editable": true,
"project_dependencies": [],
"editable_requires": [],
"runtime_strategy": "editable-install",
"runtime_build_inputs": [
"README.md"
],
"build_context_inputs": [],
"distribution_name": "pynalyser",
"evidence": [
"./pyproject.toml",
"./setup.cfg",
"./setup.py"
],
"errors": [],
"isolate_build_backend": false,
"schema_version": "programgen.python-install-contract.v7"
},
"test_binary_files": [],
"artifact_contract_version": "programgen.forward-harbor.v6",
"renderer_schema_version": "programgen.forward-renderer.v4",
"test_import_contract": [
{
"test_file": "tests/_test_acr_translator.py",
"source_file": null,
"import_root": "ast",
"definition_path": null,
"required_import_path": "ast",
"import_statement": "import ast",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": null,
"import_root": "collections",
"definition_path": null,
"required_import_path": "collections.defaultdict",
"import_statement": "from collections import defaultdict",
"symbol": "defaultdict",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": "pynalyser/acr/classes.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.acr.classes",
"required_import_path": "pynalyser.acr.classes",
"import_statement": "from pynalyser.acr import classes as acr",
"symbol": null,
"kind": "module",
"classification": "local-module"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": "pynalyser/acr/classes.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.acr.classes.Module",
"required_import_path": "pynalyser.acr.classes.Module",
"import_statement": "from pynalyser.acr import classes as acr",
"symbol": "Module",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": "pynalyser/acr/translation.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.acr.translation.Translator",
"required_import_path": "pynalyser.acr.translation.Translator",
"import_statement": "from pynalyser.acr.translation import Translator, translate_ast_to_acr",
"symbol": "Translator",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": "pynalyser/acr/translation.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.acr.translation.translate_ast_to_acr",
"required_import_path": "pynalyser.acr.translation.translate_ast_to_acr",
"import_statement": "from pynalyser.acr.translation import Translator, translate_ast_to_acr",
"symbol": "translate_ast_to_acr",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": "pynalyser/acr/utils.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.acr.utils.dump",
"required_import_path": "pynalyser.acr.utils.dump",
"import_statement": "from pynalyser.acr.utils import dump",
"symbol": "dump",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": null,
"import_root": "pytest",
"definition_path": null,
"required_import_path": "pytest",
"import_statement": "import pytest",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/_test_acr_translator.py",
"source_file": null,
"import_root": "sys",
"definition_path": null,
"required_import_path": "sys",
"import_statement": "import sys",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": "pynalyser/inherit_dicts.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.inherit_dicts.DICTS",
"required_import_path": "pynalyser.inherit_dicts.DICTS",
"import_statement": "from pynalyser.inherit_dicts import ( DICTS, DictNotFoundError, InheritDicts, MetaInheritDicts, )",
"symbol": "DICTS",
"kind": "constant",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": "pynalyser/inherit_dicts.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.inherit_dicts.DictNotFoundError",
"required_import_path": "pynalyser.inherit_dicts.DictNotFoundError",
"import_statement": "from pynalyser.inherit_dicts import ( DICTS, DictNotFoundError, InheritDicts, MetaInheritDicts, )",
"symbol": "DictNotFoundError",
"kind": "exception",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": "pynalyser/inherit_dicts.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.inherit_dicts.InheritDicts",
"required_import_path": "pynalyser.inherit_dicts.InheritDicts",
"import_statement": "from pynalyser.inherit_dicts import ( DICTS, DictNotFoundError, InheritDicts, MetaInheritDicts, )",
"symbol": "InheritDicts",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": "pynalyser/inherit_dicts.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.inherit_dicts.MetaInheritDicts",
"required_import_path": "pynalyser.inherit_dicts.MetaInheritDicts",
"import_statement": "from pynalyser.inherit_dicts import ( DICTS, DictNotFoundError, InheritDicts, MetaInheritDicts, )",
"symbol": "MetaInheritDicts",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": null,
"import_root": "pytest",
"definition_path": null,
"required_import_path": "pytest",
"import_statement": "import pytest",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inherit_dicts.py",
"source_file": null,
"import_root": "utils",
"definition_path": null,
"required_import_path": "utils.do_test",
"import_statement": "from utils import do_test",
"symbol": "do_test",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/exceptions.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.exceptions.duplicate_base",
"required_import_path": "pynalyser.types.exceptions.duplicate_base",
"import_statement": "from pynalyser.types.exceptions import duplicate_base, invalid_mro",
"symbol": "duplicate_base",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/exceptions.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.exceptions.invalid_mro",
"required_import_path": "pynalyser.types.exceptions.invalid_mro",
"import_statement": "from pynalyser.types.exceptions import duplicate_base, invalid_mro",
"symbol": "invalid_mro",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/inheritance.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.inheritance.Inheritable",
"required_import_path": "pynalyser.types.inheritance.Inheritable",
"import_statement": "from pynalyser.types.inheritance import Inheritable, is_subclass, is_type, set_bases",
"symbol": "Inheritable",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/inheritance.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.inheritance.is_subclass",
"required_import_path": "pynalyser.types.inheritance.is_subclass",
"import_statement": "from pynalyser.types.inheritance import Inheritable, is_subclass, is_type, set_bases",
"symbol": "is_subclass",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/inheritance.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.inheritance.is_type",
"required_import_path": "pynalyser.types.inheritance.is_type",
"import_statement": "from pynalyser.types.inheritance import Inheritable, is_subclass, is_type, set_bases",
"symbol": "is_type",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": "pynalyser/types/inheritance.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types.inheritance.set_bases",
"required_import_path": "pynalyser.types.inheritance.set_bases",
"import_statement": "from pynalyser.types.inheritance import Inheritable, is_subclass, is_type, set_bases",
"symbol": "set_bases",
"kind": "function",
"classification": "local-resolved"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": null,
"import_root": "typing",
"definition_path": null,
"required_import_path": "typing.Tuple",
"import_statement": "from typing import Tuple, Type",
"symbol": "Tuple",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": null,
"import_root": "typing",
"definition_path": null,
"required_import_path": "typing.Type",
"import_statement": "from typing import Tuple, Type",
"symbol": "Type",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": null,
"import_root": "utils",
"definition_path": null,
"required_import_path": "utils.do_test",
"import_statement": "from utils import do_test, raises_instance",
"symbol": "do_test",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_inheritance.py",
"source_file": null,
"import_root": "utils",
"definition_path": null,
"required_import_path": "utils.raises_instance",
"import_statement": "from utils import do_test, raises_instance",
"symbol": "raises_instance",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": null,
"import_root": "ast",
"definition_path": null,
"required_import_path": "ast",
"import_statement": "import ast",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": "pynalyser/ast/normalize_ast.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.ast.normalize_ast.AstNormalizer",
"required_import_path": "pynalyser.ast.AstNormalizer",
"import_statement": "from pynalyser.ast import AstNormalizer, normalize_ast",
"symbol": "AstNormalizer",
"kind": "class",
"classification": "local-resolved"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": "pynalyser/ast/normalize_ast.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.ast.normalize_ast",
"required_import_path": "pynalyser.ast.normalize_ast",
"import_statement": "from pynalyser.ast import AstNormalizer, normalize_ast",
"symbol": null,
"kind": "module",
"classification": "local-module"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": null,
"import_root": "sys",
"definition_path": null,
"required_import_path": "sys",
"import_statement": "import sys",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": null,
"import_root": "typing",
"definition_path": null,
"required_import_path": "typing.cast",
"import_statement": "from typing import cast",
"symbol": "cast",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_normalize_ast.py",
"source_file": null,
"import_root": "utils",
"definition_path": null,
"required_import_path": "utils.do_test",
"import_statement": "from utils import do_test",
"symbol": "do_test",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_structure_types.py",
"source_file": null,
"import_root": "operator",
"definition_path": null,
"required_import_path": "operator",
"import_statement": "import operator",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/test_structure_types.py",
"source_file": "pynalyser/analysers/type_inference.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.analysers.type_inference.BINOP",
"required_import_path": "pynalyser.analysers.type_inference.BINOP",
"import_statement": "from pynalyser.analysers.type_inference import CMPOP, BINOP",
"symbol": "BINOP",
"kind": "constant",
"classification": "local-resolved"
},
{
"test_file": "tests/test_structure_types.py",
"source_file": "pynalyser/analysers/type_inference.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.analysers.type_inference.CMPOP",
"required_import_path": "pynalyser.analysers.type_inference.CMPOP",
"import_statement": "from pynalyser.analysers.type_inference import CMPOP, BINOP",
"symbol": "CMPOP",
"kind": "constant",
"classification": "local-resolved"
},
{
"test_file": "tests/test_structure_types.py",
"source_file": "pynalyser/types/__init__.py",
"import_root": "pynalyser",
"definition_path": "pynalyser.types",
"required_import_path": "pynalyser.types.*",
"import_statement": "from pynalyser.types import *",
"symbol": null,
"kind": "module",
"classification": "local-module"
},
{
"test_file": "tests/test_structure_types.py",
"source_file": null,
"import_root": "utils",
"definition_path": null,
"required_import_path": "utils.do_test",
"import_statement": "from utils import do_test",
"symbol": "do_test",
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/utils.py",
"source_file": null,
"import_root": "pytest",
"definition_path": null,
"required_import_path": "pytest",
"import_statement": "import pytest",
"symbol": null,
"kind": "external",
"classification": "external"
},
{
"test_file": "tests/utils.py",
"source_file": null,
"import_root": "re",
"definition_path": null,
"required_import_path": "re",
"import_statement": "import re",
"symbol": null,
"kind": "external",
"classification": "external"
}
],
"test_import_contract_digest": "276a6e2ac711c25fbb1157d9118876ebe1cbc0f4a7c66f20f74731d3439a9719"
}