Project

General

Profile

« Previous | Next » 

Revision 496d90f7

Added by koszko over 1 year ago

make it easier to reuse/cache foreign package files when building a Hydrilla source package multiple times

View differences:

tests/test_build.py
176 176

  
177 177
expected = [*expected_resources, expected_mapping, expected_source_description]
178 178

  
179
@pytest.fixture
180
def tmpdir() -> Iterable[str]:
181
    """
182
    Provide test case with a temporary directory that will be automatically
183
    deleted after the test.
184
    """
185
    with TemporaryDirectory() as tmpdir:
186
        yield Path(tmpdir)
187

  
188 179
def run_reuse(command, **kwargs):
189 180
    """
190 181
    Instead of running a 'reuse' command, check if 'mock_reuse_missing' file
......
677 668
    error_type, error_regex = sample_source_make_errors
678 669

  
679 670
    dstdir = Path(tmpdir) / 'dstdir'
680
    tmpdir = Path(tmpdir) / 'example'
681

  
682 671
    dstdir.mkdir(exist_ok=True)
683
    tmpdir.mkdir(exist_ok=True)
684 672

  
685 673
    with pytest.raises(error_type, match=error_regex):
686 674
        build.Build(sample_source, Path('index.json'))\

Also available in: Unified diff