ad9f8480c8e08b95d6c217ec4a126bd93b7f376a,tests/python/pants_test/backend/jvm/targets/test_jvm_app.py,BundleTest,test_bundle_add,#BundleTest#,289
Before Change
self.target("src/java/org/archimedes/crown")
def test_bundle_add(self):
self.create_dir("src/java/org/archimedes/volume/config/stone")
self.create_file("src/java/org/archimedes/volume/config/stone/dense.xml")
self.create_dir("src/java/org/archimedes/volume/config")
self.create_file("src/java/org/archimedes/volume/config/metal/dense.xml")
self.add_to_build_file("src/java/org/archimedes/volume/BUILD", dedent("""
jvm_binary(name="unused")
"""))
self.add_to_build_file("src/java/org/archimedes/volume/BUILD", dedent("""
jvm_app(name="volume",
dependencies=[":unused"],
bundles=[
bundle(relative_to="config", fileset=["config/stone/dense.xml", "config/metal/dense.xml"])
]
)
"""))
app = self.target("src/java/org/archimedes/volume")
for k in app.bundles[0].filemap.keys():
if k.endswith("archimedes/volume/config/stone/dense.xml"):
stonexml_key = k
self.assertEquals(app.bundles[0].filemap[stonexml_key],
"stone/dense.xml")
def test_multiple_bundles(self):
After Change
DirectoryReMapper("dummy/src/java/org/archimedes/crown/missing", "dummy")
def test_bundle_add(self):
spec_path = "src/java/org/archimedes/volume"
stone_dense = self.create_file(os.path.join(spec_path, "config/stone/dense.xml"))
metal_dense = self.create_file(os.path.join(spec_path, "config/metal/dense.xml"))
unused = self.make_target(Address(spec_path, "unused").spec, JvmBinary)
bundle = self.create_bundle(spec_path,
relative_to="config",
fileset=["config/stone/dense.xml", "config/metal/dense.xml"])
app = self.make_target(spec_path, JvmApp, dependencies=[unused], bundles=[bundle])
self.assertEqual(1, len(app.bundles))
self.assertEqual({stone_dense: "stone/dense.xml", metal_dense: "metal/dense.xml"},
app.bundles[0].filemap)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 31
Instances
Project Name: pantsbuild/pants
Commit Name: ad9f8480c8e08b95d6c217ec4a126bd93b7f376a
Time: 2015-08-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/jvm/targets/test_jvm_app.py
Class Name: BundleTest
Method Name: test_bundle_add
Project Name: pantsbuild/pants
Commit Name: ad9f8480c8e08b95d6c217ec4a126bd93b7f376a
Time: 2015-08-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/jvm/targets/test_jvm_app.py
Class Name: BundleTest
Method Name: test_bundle_add
Project Name: pantsbuild/pants
Commit Name: ad9f8480c8e08b95d6c217ec4a126bd93b7f376a
Time: 2015-08-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/jvm/targets/test_jvm_app.py
Class Name: BundleTest
Method Name: test_bundle_filemap_dest_relative
Project Name: pantsbuild/pants
Commit Name: ad9f8480c8e08b95d6c217ec4a126bd93b7f376a
Time: 2015-08-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/jvm/targets/test_jvm_app.py
Class Name: BundleTest
Method Name: test_bundle_filemap_dest_remap