aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Brant2013-07-13 11:00:01 -0500
committerSean Brant2013-07-13 11:00:01 -0500
commitfe8360e25afc60f6288470b88cdbccde61f265f3 (patch)
tree6271cc5585339b19569c10445fedf6cdac64867d /tests
parentdc8c1dce14c8ffcd0d1516b8ab52ae6f775d7337 (diff)
downloadpykss-fe8360e25afc60f6288470b88cdbccde61f265f3.tar.bz2
Closes #5. Now opens files using utf-8.
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures/comments.txt6
-rw-r--r--tests/test_comment.py5
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/fixtures/comments.txt b/tests/fixtures/comments.txt
index 885887c..389ff6d 100644
--- a/tests/fixtures/comments.txt
+++ b/tests/fixtures/comments.txt
@@ -40,3 +40,9 @@ Comment with example:
* <div></div>
* </div>
*/
+
+
+Comment with non ASCII:
+
+/* Hello, 世界
+ */
diff --git a/tests/test_comment.py b/tests/test_comment.py
index e1e94c6..81824eb 100644
--- a/tests/test_comment.py
+++ b/tests/test_comment.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
import os
import unittest
@@ -73,3 +75,6 @@ This comment has a indented example
</div>
"""
self.assertTrue(expected.strip() in self.comments)
+
+ def test_handles_unicode_in_comments(self):
+ self.assertTrue(u'Hello, 世界' in self.comments)