fcbcb3c73892ee31df710fcd6b48d06a3efdc143,src/python/pants/engine/target_test.py,,test_string_sequence_field,#,434

Before Change


        with pytest.raises(InvalidFieldTypeException):
            Example(raw_value, address=addr)

    for v in [0, object(), "strings are technically iterable...", [0, 1], ["hello", 1]]:
        assert_invalid_type(v)


def test_string_or_string_sequence_field() -> None:
    class Example(StringOrStringSequenceField):

After Change


        alias = "example"

    addr = Address.parse(":example")
    assert Example(["hello", "world"], address=addr).value == ("hello", "world")
    assert Example(None, address=addr).value is None
    with pytest.raises(InvalidFieldTypeException):
        Example("strings are technically iterable...", address=addr)
    with pytest.raises(InvalidFieldTypeException):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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_sequence_field


Project Name: pantsbuild/pants
Commit Name: 1299ddece5d6cb45adbe5ab797f1a151e8430196
Time: 2016-03-16
Author: kwilson@twopensource.com
File Name: tests/python/pants_test/pantsd/subsystem/test_watchman_launcher.py
Class Name: TestWatchmanLauncher
Method Name: test_watchman_property


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: tensorflow/agents
Commit Name: f39d58e92b93d6d2ede2013d37e244393121a9e5
Time: 2021-01-05
Author: tobyboyd@google.com
File Name: tf_agents/experimental/distributed/examples/eval_job_test.py
Class Name: EvalJobTest
Method Name: test_eval_job