d6a9490d2ede2ac54a560daf109dd4934b3a0919,tests/python/pants_test/engine/test_build_files.py,AddressesFromAddressFamiliesTest,test_tag_filter,#AddressesFromAddressFamiliesTest#,58
Before Change
Test that targets are filtered based on `tags`.
spec = SiblingAddresses("root")
address_mapper = AddressMapper(JsonParser(TestTable()))
snapshot = Snapshot(DirectoryDigest("xx", 2),
(Path("root/BUILD", File("root/BUILD")),))
address_family = AddressFamily("root",
{"a": ("root/BUILD", TargetAdaptor()),
"b": ("root/BUILD", TargetAdaptor(tags={"integration"})),
"c": ("root/BUILD", TargetAdaptor(tags={"not_integration"}))
After Change
def test_tag_filter(self):
Test that targets are filtered based on `tags`.
specs = Specs([SiblingAddresses("root")], tags=["+integration"])
address_family = AddressFamily("root",
{"a": ("root/BUILD", TargetAdaptor()),
"b": ("root/BUILD", TargetAdaptor(tags={"integration"})),
"c": ("root/BUILD", TargetAdaptor(tags={"not_integration"}))
}
)
targets = self._resolve_build_file_addresses(
specs, address_family, self._snapshot(), self._address_mapper())
self.assertEqual(len(targets.dependencies), 1)
self.assertEqual(targets.dependencies[0].spec, "root:b")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: pantsbuild/pants
Commit Name: d6a9490d2ede2ac54a560daf109dd4934b3a0919
Time: 2018-09-15
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: tests/python/pants_test/engine/test_build_files.py
Class Name: AddressesFromAddressFamiliesTest
Method Name: test_tag_filter
Project Name: pantsbuild/pants
Commit Name: d6a9490d2ede2ac54a560daf109dd4934b3a0919
Time: 2018-09-15
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: tests/python/pants_test/engine/test_build_files.py
Class Name: AddressesFromAddressFamiliesTest
Method Name: test_exclude_pattern
Project Name: pantsbuild/pants
Commit Name: d6a9490d2ede2ac54a560daf109dd4934b3a0919
Time: 2018-09-15
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: tests/python/pants_test/engine/test_build_files.py
Class Name: AddressesFromAddressFamiliesTest
Method Name: test_exclude_pattern_with_single_address