def test_anything_operated_with_top_is_top(self, val: PythonValue) -> None: for op in ops_symbols.keys(): top = PythonValue.top() new_val = getattr(val, op)(top) assert new_val.is_top() new_val = getattr(top, op)(val) assert new_val.is_top()
def test_join_to_top_is_always_top(self, val: PythonValue) -> None: top = PythonValue.top() joined1 = top.join(val) joined2 = val.join(top) assert joined1.is_top() assert joined2.is_top() assert joined1 == joined2
from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { 'n': PV.top(), 'i': PV(Int.top()), 'j': PV(Int.top()), }
import pytropos.internals.values as pv from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values.builtin_mutvalues import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { '_': PV.top(), 'a': PV(List([pv.list([PV(Int.top())]), PV.top()], size=(1, 2))), 'b': PV(Int.top()), 'c': PV(List([PV.top(), PV.top()])), } store['c'].val.children[('index', 1)] = store['a'] # similar to c[1] = a
from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = {'a': PV(Int(5)), 'c': PV.top(), 'd': PV.top()}
import pytropos.internals.values as pv from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { 'a': PV.top(), 'l': pv.list([PV.top(), pv.int(21), PV.top()]), 'n': PV.top(), 'm': PV.top(), }
from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { 'i': PV(Int(10)), 'j': PV.top(), }
import hypothesis.strategies as st import pytropos.internals.values as pv from pytropos.internals.values.python_values import PythonValue st_ints = st.one_of(st.integers(), st.none()) st_floats = st.one_of(st.floats(), st.none()) st_bools = st.one_of(st.booleans(), st.none()) st_pv_bools_ints = st.one_of( st.builds(pv.int, st_ints), st.builds(pv.bool, st_bools), ) st_any_pv = st.one_of(st.builds(pv.int, st_ints), st.builds(pv.float, st_floats), st.builds(pv.bool, st_bools), st.just(pv.none()), st.just(PythonValue.top()))
from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { 'a': PV(Int(5)), 'c': PV(Float(2)), 'd': PV.top() }
from pytropos.internals.values.builtin_values import * from pytropos.internals.values.python_values import PythonValue as PV exitcode = 1 store = { '_': PV.top(), 'c': PV.top(), 'b': PV.top(), 'a': PV.top(), }