How to use the kas.kas.kas function in kas

To help you get started, we’ve selected a few kas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github siemens / kas / tests / test_patch.py View on Github external
def test_patch_update(changedir, tmpdir):
    """
        Test that patches are applied correctly after switching refspec from
        a branch to a commit hash and vice-versa with both git and mercurial
        repositories.
    """
    tdir = str(tmpdir.mkdir('test_patch_update'))
    shutil.rmtree(tdir, ignore_errors=True)
    print(os.getcwd())
    shutil.copytree('tests/test_patch', tdir)
    os.chdir(tdir)
    kas.kas(['shell', 'test.yml', '-c', 'true'])
    kas.kas(['shell', 'test2.yml', '-c', 'true'])
    for f in ['kas/tests/test_patch/hello.sh', 'hello/hello.sh']:
        assert os.stat(f)[stat.ST_MODE] & stat.S_IXUSR
github siemens / kas / tests / test_patch.py View on Github external
def test_patch_update(changedir, tmpdir):
    """
        Test that patches are applied correctly after switching refspec from
        a branch to a commit hash and vice-versa with both git and mercurial
        repositories.
    """
    tdir = str(tmpdir.mkdir('test_patch_update'))
    shutil.rmtree(tdir, ignore_errors=True)
    print(os.getcwd())
    shutil.copytree('tests/test_patch', tdir)
    os.chdir(tdir)
    kas.kas(['shell', 'test.yml', '-c', 'true'])
    kas.kas(['shell', 'test2.yml', '-c', 'true'])
    for f in ['kas/tests/test_patch/hello.sh', 'hello/hello.sh']:
        assert os.stat(f)[stat.ST_MODE] & stat.S_IXUSR