feat: add util
module with exists()
function
This commit is contained in:
parent
e3b593d628
commit
4879887cb3
4 changed files with 53 additions and 0 deletions
14
tests/test_util.py
Normal file
14
tests/test_util.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from wuttamess import util as mod
|
||||
|
||||
|
||||
class TestExists(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
c = MagicMock()
|
||||
mod.exists(c, '/foo')
|
||||
c.run.assert_called_once_with('test -e /foo', warn=True)
|
Loading…
Add table
Add a link
Reference in a new issue