Did I find the right examples for you? yes no

All Samples(13)  |  Call(9)  |  Derive(0)  |  Import(4)

src/h/a/hashdist-HEAD/hashdist/core/test/test_source_cache.py   hashdist(Download)
from ..hasher import Hasher, format_digest
 
from .utils import temp_dir, working_directory, VERBOSE, logger, assert_raises, MemoryLogger
from . import utils
 
def make_mock_git_repo(submodules=None):
    mock_git_repo = tempfile.mkdtemp()
    with working_directory(mock_git_repo):
        repo = os.path.join(mock_git_repo, '.git')
        git('init', repo=repo)
                assert f.read() == 'First revision'
            # The unpack should be a git checkout positioned in the right commit
            with working_directory(pjoin(d, 'foo')):
                assert os.path.isdir('.git')
                p = subprocess.Popen(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE,

src/h/a/hashdist-0.3c1/hashdist/core/test/test_links.py   hashdist(Download)
import shutil
 
from .utils import (temp_working_dir, temp_dir, working_directory, eqsorted_,
        cat, assert_raises)
from .test_ant_glob import makefiles
        # absolute `select`, relative `target`
        env['D'] = 'subdir'
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),
            if 'prefix' in rule:
                rule['prefix'] = rule['prefix'][1:]
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),
        for rule in rules:
            rule['overwrite'] = True
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),

src/h/a/hashdist-HEAD/hashdist/core/test/test_links.py   hashdist(Download)
import shutil
 
from .utils import (temp_working_dir, temp_dir, working_directory, eqsorted_,
        cat, assert_raises)
from .test_ant_glob import makefiles
        # absolute `select`, relative `target`
        env['D'] = 'subdir'
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),
            if 'prefix' in rule:
                rule['prefix'] = rule['prefix'][1:]
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),
        for rule in rules:
            rule['overwrite'] = True
        with working_directory('/'):
            actions = links.dry_run_links_dsl(rules, env)
        assert actions == [(silent_makedirs, 'subdir/bin'),

src/h/a/hashdist-0.3c1/hashdist/core/test/test_source_cache.py   hashdist(Download)
from ..hasher import Hasher, format_digest
 
from .utils import temp_dir, working_directory, VERBOSE, logger, assert_raises, MemoryLogger
from . import utils
 
def make_mock_git_repo():
    with working_directory(mock_git_repo):
        repo = os.path.join(mock_git_repo, '.git')
        git('init', repo=repo)
        cat('README', 'First revision')