f90b9826f064af61556c92e4bbc573861ee0b9fe,src/python/pants/backend/python/dependency_inference/module_mapper_test.py,,test_map_module_to_address,#Any#,164

Before Change



    // Test a module with no owner (stdlib). This also sanity checks that we can handle when
    // there is no parent module.
    assert get_owner("typing") is None

    // Test a module with a single owner with a top-level source root of ".". Also confirm we
    // can handle when the module includes a symbol (like a class name) at the end.
    rule_runner.create_file("script.py")

After Change


    // requirement. Note that `colors.pyi` is at the top-level of the source root so that it strips
    // to the module `colors`.
    rule_runner.create_file("source_root1/colors.pyi")
    rule_runner.add_to_build_file("source_root1", "python_library()")
    assert get_owners("colors.red") == [
        Address("3rdparty/python", target_name="ansicolors"),
        Address("source_root1", relative_file_path="colors.pyi"),
    ]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: pantsbuild/pants
Commit Name: f90b9826f064af61556c92e4bbc573861ee0b9fe
Time: 2020-09-28
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/dependency_inference/module_mapper_test.py
Class Name:
Method Name: test_map_module_to_address


Project Name: pantsbuild/pants
Commit Name: 145ad80084a35ea06786933131a9834625f515de
Time: 2020-07-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/internals/graph_test.py
Class Name: TestDependencies
Method Name: test_normal_resolution


Project Name: pantsbuild/pants
Commit Name: 79d358a10723d9a1c9cef7aed16ccc5a693f3f6c
Time: 2018-06-11
Author: dawagner@gmail.com
File Name: tests/python/pants_test/backend/jvm/targets/test_jvm_binary.py
Class Name: JvmBinaryTest
Method Name: test_manifest_bad_key