feat: add util module with exists() function

This commit is contained in:
Lance Edgar 2024-09-12 12:55:28 -05:00
parent e3b593d628
commit 4879887cb3
4 changed files with 53 additions and 0 deletions

14
tests/test_util.py Normal file
View 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)