def test_safe_compile_wrong_iterable_in_tuples_lists_sets(text): with pytest.raises(ValueError): safe_compile_text(text)
def test_safe_compile_valid_but_unsupported_python(text): result = safe_compile_text(text) assert result.startswith('unsupported')
def test_safe_compile_invalid_python(text): assert safe_compile_text(text) == text
def test_safe_compile_invalid_python_with_raises(text): with pytest.raises(SyntaxError): safe_compile_text(text, raises=True)
def test_safe_compile_generic(text, obj): assert safe_compile_text(text) == obj