fcbcb3c73892ee31df710fcd6b48d06a3efdc143,src/python/pants/engine/target_test.py,,test_string_or_string_sequence_field,#,454

Before Change


    def assert_flexible_constructor(raw_value: Iterable[str]) -> None:
        assert Example(raw_value, address=addr).value == tuple(raw_value)

    for v in [("hello", "world"), ["hello", "world"], OrderedSet(["hello", "world"])]:
        assert_flexible_constructor(v)
    assert Example("hello world", address=addr).value == ("hello world",)

    def assert_invalid_type(raw_value: Any) -> None:
        with pytest.raises(InvalidFieldTypeException):

After Change


    assert Example(["hello", "world"], address=addr).value == ("hello", "world")
    assert Example("hello world", address=addr).value == ("hello world",)
    with pytest.raises(InvalidFieldTypeException):
        Example(["hello", 0, "world"], address=addr)


def test_dict_string_to_string_field() -> None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pantsbuild/pants
Commit Name: fcbcb3c73892ee31df710fcd6b48d06a3efdc143
Time: 2020-04-06
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/target_test.py
Class Name:
Method Name: test_string_or_string_sequence_field


Project Name: pantsbuild/pants
Commit Name: 0a6edd21b9ab29a1f733b90ff15092e7a03f665d
Time: 2014-01-15
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/targets/python_target.py
Class Name: PythonTarget
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: fcbcb3c73892ee31df710fcd6b48d06a3efdc143
Time: 2020-04-06
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/target_test.py
Class Name:
Method Name: test_string_sequence_field