diff --git a/selftests/unit/test_utils_script.py b/selftests/unit/test_utils_script.py new file mode 100644 index 0000000000000000000000000000000000000000..450e2e461f345cc44ef4a04fe8c4fe9b542251a3 --- /dev/null +++ b/selftests/unit/test_utils_script.py @@ -0,0 +1,20 @@ +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()