Fix qisys and qisrc tests
Remove project error log changed
Using pytest.fail to handle tests errors
Tested-by: gerrit
Tested-by: mballarini
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.
+
import qisys.sh
import qisys.script
from qisys.test.conftest import TestWorkTree
-def test_qisrc_remove_exsiting(qisrc_action):
+
+def test_qisrc_remove_existing(qisrc_action):
worktree = qisrc_action.worktree
worktree.create_project("foo")
qisrc_action("remove", "foo")
@@ -14,6 +16,7 @@ def test_qisrc_remove_exsiting(qisrc_action):
assert not worktree.get_project("foo")
assert worktree.tmpdir.join("foo").check(dir=True)
+
def test_qisrc_remove_existing_from_disk(qisrc_action):
worktree = qisrc_action.worktree
worktree.create_project("foo")
@@ -22,6 +25,7 @@ def test_qisrc_remove_existing_from_disk(qisrc_action):
assert not worktree.get_project("foo")
assert not worktree.tmpdir.join("foo").check(dir=True)
+
def test_qisrc_fails_when_not_exists(qisrc_action):
error = qisrc_action("remove", "foo", raises=True)
- assert "No such project: foo" in error
+ assert "No project in 'foo'" in error
