def test_zapp_yaml_not_exists(self): try: with mock.patch('os.getcwd') as cwd: cwd.return_value = self.subdir with pytest.raises(RuntimeError): zpm.find_project_root() finally: shutil.rmtree(self.tempdir)
def bundle(args): """Bundle a ZeroVM application This command creates a Zapp using the instructions in zapp.yaml. The file is read from the project root. """ root = zpm.find_project_root() zpm.bundle_project(root, refresh_deps=args.refresh_deps)
def bundle(args): """Bundle a ZeroVM application This command creates a ZAR using the instructions in ``zar.json``. The file is read from the project root. """ root = zpm.find_project_root() zpm.bundle_project(root)
def test_zapp_yaml_exists(self): try: zapp_path = os.path.join(self.tempdir, 'zapp.yaml') # "touch" the file open(zapp_path, 'w').close() with mock.patch('os.getcwd') as cwd: cwd.return_value = self.subdir root = zpm.find_project_root() assert root == self.tempdir finally: shutil.rmtree(self.tempdir)