Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Mar 4, 2020
1 parent fccf423 commit f2c057a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions unittests/test_exec_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from spinn_utilities.executable_finder import ExecutableFinder
import pytest


def test_create_and_config(tmpdir):
Expand All @@ -28,7 +29,8 @@ def test_create_and_config(tmpdir):

def test_find_in_no_places():
ef = ExecutableFinder([])
assert ef.get_executable_path("abc.aplx") is None
with pytest.raises(KeyError):
ef.get_executable_path("abc.aplx")


def test_find_in_one_place(tmpdir):
Expand All @@ -54,7 +56,8 @@ def test_find_in_two_places(tmpdir):
w2.remove()
assert ef.get_executable_path("abc.aplx") == str(w1)
w1.remove()
assert ef.get_executable_path("abc.aplx") is None
with pytest.raises(KeyError):
ef.get_executable_path("abc.aplx")


def test_find_no_duplicates(tmpdir):
Expand Down

0 comments on commit f2c057a

Please sign in to comment.