add test for util.which
* and make runtests.sh dash-compatible for debian-like OS
This commit is contained in:
parent
e7e786b65e
commit
872c2047e5
2 changed files with 10 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import mock
|
||||
import unittest
|
||||
import re
|
||||
|
||||
import tests.mocks as mocks
|
||||
|
||||
|
@ -53,4 +54,12 @@ class TestUtil(unittest.TestCase):
|
|||
with self.assertRaises(RuntimeError):
|
||||
execute(self.some_command_with_args)
|
||||
|
||||
def test_which(self):
|
||||
program = "iwgetid"
|
||||
self.assertTrue(
|
||||
which(program) is None or
|
||||
re.search('/(' + program + ')$', which(program))
|
||||
)
|
||||
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue