def test_ensure_missing_targets(source_dir): local_targets = ['file1.rtf', 'sub/subfile1.rtf'] targets = [str(source_dir.join(t)) for t in local_targets] cmd = pkg.ensure_targets(targets) with pytest.raises(ValueError): run_command(cmd)
def test_ensure_with_skip_npm(source_dir, mocker): mocker.patch('jupyter_packaging.setupbase.skip_npm', True) local_targets = ['file1.rtf', 'sub/subfile1.rtf'] targets = [str(source_dir.join(t)) for t in local_targets] cmd = pkg.ensure_targets(targets) run_command(cmd)
def test_ensure_existing_targets(destination_dir): local_targets = ['file1.rtf', 'sub/subfile1.rtf'] targets = [str(destination_dir.join(t)) for t in local_targets] cmd = pkg.ensure_targets(targets) run_command(cmd)