Skip to content

Commit

Permalink
TST: assert error is raised when publishing on a repository that does…
Browse files Browse the repository at this point in the history
… not exist
  • Loading branch information
frankenjoe committed Sep 19, 2023
1 parent 0e145ba commit abbe8d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import shutil

import audbackend
import numpy as np
import pandas as pd
import pytest
Expand Down Expand Up @@ -951,6 +952,17 @@ def test_publish_error_changed_deps_file_type(tmpdir, repository):
audeer.rmdir(db_path)


def test_publish_error_repository_does_not_exist(tmpdir, repository):

db = audformat.Database('test')
db.save(tmpdir)

repository.name = 'does-not-exist'
with pytest.raises(audbackend.BackendError) as ex:
audb.publish(tmpdir, '1.0.0', repository)
assert 'No such file or directory' in str(ex.value.exception)


@pytest.mark.parametrize(
'file',
[
Expand Down

0 comments on commit abbe8d6

Please sign in to comment.