diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-05-11 23:00:34 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-05-11 23:00:34 -0400 |
commit | 3a67982794e40043e51449e1d40b07258ef8b932 (patch) | |
tree | e281ee6e4adb321ebfe8ff16b89417e46ceb00e4 /test/farm/html/src | |
parent | 63c509ca06a76cfff093ebd0806c2f04cc30f238 (diff) | |
download | python-coveragepy-git-3a67982794e40043e51449e1d40b07258ef8b932.tar.gz |
Add a test case for bug #179.
Diffstat (limited to 'test/farm/html/src')
-rw-r--r-- | test/farm/html/src/bom.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/farm/html/src/bom.py b/test/farm/html/src/bom.py new file mode 100644 index 00000000..2db8b717 --- /dev/null +++ b/test/farm/html/src/bom.py @@ -0,0 +1,11 @@ +# A python source file in utf-8, with BOM
+math = "3×4 = 12, ÷2 = 6±0"
+ +import sys
+
+if sys.version_info >= (3, 0):
+ assert len(math) == 18
+ assert len(math.encode('utf-8')) == 21
+else:
+ assert len(math) == 21
+ assert len(math.decode('utf-8')) == 18
|