コード例 #1
0
ファイル: test_zpm.py プロジェクト: larsbutler/zerovm-cli
    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)
コード例 #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)
コード例 #3
0
ファイル: commands.py プロジェクト: barkinet/zpm
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)
コード例 #4
0
ファイル: commands.py プロジェクト: al-maisan/zpm
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)
コード例 #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)
コード例 #6
0
ファイル: test_zpm.py プロジェクト: larsbutler/zerovm-cli
    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)
コード例 #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)