summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörn Hees <joernhees@users.noreply.github.com>2015-08-11 19:25:08 +0200
committerJörn Hees <joernhees@users.noreply.github.com>2015-08-11 19:25:08 +0200
commit48e436f3968755eefcd3300eadabec24b4c021bc (patch)
tree738f38332517a45e70d8d4a60e7772c9b35afc45
parentb2f91381518e2ea3f3229ac3a4ba5829ad93c411 (diff)
parent571ca6bd747c4b0a3b4d5d004e45c19f456cdcb5 (diff)
downloadrdflib-48e436f3968755eefcd3300eadabec24b4c021bc.tar.gz
Merge pull request #509 from joernhees/test_narrow_python
added failing test for narrow python builds, closes #456
-rw-r--r--test/test_wide_python.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_wide_python.py b/test/test_wide_python.py
new file mode 100644
index 00000000..feef4519
--- /dev/null
+++ b/test/test_wide_python.py
@@ -0,0 +1,14 @@
+
+def test_wide_python_build():
+ """This test is meant to fail on narrow python builds (common on Mac OS X).
+
+ See https://github.com/RDFLib/rdflib/issues/456 for more information.
+ """
+ assert len(u'\U0010FFFF') == 1, (
+ 'You are using a narrow Python build!\n'
+ 'This means that your Python does not properly support chars > 16bit.\n'
+ 'On your system chars like c=u"\\U0010FFFF" will have a len(c)==2.\n'
+ 'As this can cause hard to debug problems with string processing\n'
+ '(slicing, regexp, ...) later on, we strongly advise to use a wide\n'
+ 'Python build in production systems.'
+ )