Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
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)
Beispiel #6
0
    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)
Beispiel #7
0
    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)