8e2d975972a3188d0a017bdc607c7c25b0bf9ac7,src/python/pants/engine/internals/graph_test.py,TestOwners,test_owners_source_file_does_not_exist,#TestOwners#,280

Before Change


        
        self.create_file("demo/f.txt")
        self.add_to_build_file("demo", "target(sources=["*.txt"])")
        result = self.request_single_product(Owners, OwnersRequest(("demo/deleted.txt",)))
        assert result == Owners([Address("demo", target_name="demo")])
        // For files that do exist, we should still use a generated subtarget, though.
        result = self.request_single_product(Owners, OwnersRequest(("demo/f.txt",)))
        assert result == Owners([Address("demo", relative_file_path="f.txt", target_name="demo")])

After Change


        )

        // If a sibling file uses the original target, then both should be used.
        self.assert_owners(
            ["demo/f.txt", "demo/deleted.txt"],
            expected={
                Address("demo", relative_file_path="f.txt", target_name="demo"),
                Address("demo"),
            },
        )

    def test_owners_multiple_owners(self) -> None:
        Even if there are multiple owners of the same file, we still use generated subtargets.
        self.create_files("demo", ["f1.txt", "f2.txt"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 8e2d975972a3188d0a017bdc607c7c25b0bf9ac7
Time: 2020-08-07
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/internals/graph_test.py
Class Name: TestOwners
Method Name: test_owners_source_file_does_not_exist


Project Name: pantsbuild/pants
Commit Name: 8e2d975972a3188d0a017bdc607c7c25b0bf9ac7
Time: 2020-08-07
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/internals/graph_test.py
Class Name: TestOwners
Method Name: test_owners_multiple_owners


Project Name: pantsbuild/pants
Commit Name: 8e2d975972a3188d0a017bdc607c7c25b0bf9ac7
Time: 2020-08-07
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/engine/internals/graph_test.py
Class Name: TestOwners
Method Name: test_owners_build_file