提交 be5aa4c6 编写于 作者: C Cleber Rosa

selftests/unit/test_utils_script.py: add test for the script module

Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 b9a719cb
import os
import unittest
from avocado.utils import script
class TestTemporary(unittest.TestCase):
def test_unicode_name(self):
path = u'\u00e1 \u00e9 \u00ed \u00f3 \u00fa'
content = "a e i o u"
with script.TemporaryScript(path, content) as temp_script:
self.assertTrue(os.path.exists(temp_script.path))
with open(temp_script.path) as temp_script_file:
self.assertEqual(content, temp_script_file.read())
if __name__ == "__main__":
unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册