aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2014-10-27 18:24:47 +0100
committerMatěj Cepl <mcepl@redhat.com>2014-10-27 18:24:47 +0100
commit7297401f8acb8a232ad629bc03be635c2c530926 (patch)
tree8712a4543e2051e87b9b0b857f78db6845e6015d
parent977d275cead808002829703389868162e7813ca4 (diff)
downloadyamlish-7297401f8acb8a232ad629bc03be635c2c530926.tar.gz
Adding non-UTF8 test string
-rw-r--r--test/test_reader_nonUTF8.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_reader_nonUTF8.py b/test/test_reader_nonUTF8.py
new file mode 100644
index 0000000..12d38f6
--- /dev/null
+++ b/test/test_reader_nonUTF8.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, print_function, unicode_literals
+import yamlish
+import test
+import unittest
+
+test_data_list = [{
+ "name": 'Non UTF8 test',
+ "in": ['--- \xbd\xd0\xe1 \xd1\xeb\xdb\xde \xdc\xdd\xde\xd3\xde' +
+ '\xdd\xd0 \xe7\xd5\xdb\xdd\xd5;\n', '...', ],
+ "out": "Нас было много на челне;",
+}]
+
+
+class TestReader(unittest.TestCase): # IGNORE:C0111
+ pass
+
+test.generate_testsuite(test_data_list, TestReader, yamlish.load)
+
+if __name__ == "__main__":
+ unittest.main()