def test_bundle_filemap_dest_remap(self): spec_path = 'src/java/org/archimedes/crown' one = self.create_file(os.path.join(spec_path, 'config/one.xml')) unused = self.make_target(Address(spec_path, 'unused').spec, JvmBinary) mapper = DirectoryReMapper(os.path.join(spec_path, 'config'), 'gold/config') app = self.make_target(spec_path, JvmApp, dependencies=[unused], bundles=[_bundle(spec_path)(mapper=mapper, fileset='config/one.xml')]) self.assertEqual(1, len(app.bundles)) self.assertEqual({one: 'gold/config/one.xml'}, app.bundles[0].filemap)
def test_bundle_filemap_dest_remap(self): spec_path = "src/java/org/archimedes/crown" one = self.create_file(os.path.join(spec_path, "config/one.xml")) unused = self.make_target(Address(spec_path, "unused").spec, JvmBinary) mapper = DirectoryReMapper(os.path.join(spec_path, "config"), "gold/config") app = self.make_target( spec_path, JvmApp, dependencies=[unused], bundles=[_bundle(spec_path)(mapper=mapper, fileset="config/one.xml")], ) self.assertEqual(1, len(app.bundles)) self.assertEqual({one: "gold/config/one.xml"}, app.bundles[0].filemap)
def test_bundle_filemap_remap_base_not_exists(self): # Create directly with self.assertRaises(DirectoryReMapper.NonexistentBaseError): DirectoryReMapper("dummy/src/java/org/archimedes/crown/missing", "dummy")