Python unicodedata.unidata_version() Examples
The following are 13
code examples of unicodedata.unidata_version().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
unicodedata
, or try the search function
.
Example #1
Source File: test_ucn.py From Fluid-Designer with GNU General Public License v3.0 | 6 votes |
def test_named_sequences_full(self): # Check all the named sequences url = ("http://www.pythontest.net/unicode/%s/NamedSequences.txt" % unicodedata.unidata_version) try: testdata = support.open_urlresource(url, encoding="utf-8", check=check_version) except (OSError, HTTPException): self.skipTest("Could not retrieve " + url) self.addCleanup(testdata.close) for line in testdata: line = line.strip() if not line or line.startswith('#'): continue seqname, codepoints = line.split(';') codepoints = ''.join(chr(int(cp, 16)) for cp in codepoints.split()) self.assertEqual(unicodedata.lookup(seqname), codepoints) with self.assertRaises(SyntaxError): self.checkletter(seqname, None) with self.assertRaises(KeyError): unicodedata.ucd_3_2_0.lookup(seqname)
Example #2
Source File: test_ucn.py From ironpython3 with Apache License 2.0 | 6 votes |
def test_named_sequences_full(self): # Check all the named sequences url = ("http://www.pythontest.net/unicode/%s/NamedSequences.txt" % unicodedata.unidata_version) try: testdata = support.open_urlresource(url, encoding="utf-8", check=check_version) except (OSError, HTTPException): self.skipTest("Could not retrieve " + url) self.addCleanup(testdata.close) for line in testdata: line = line.strip() if not line or line.startswith('#'): continue seqname, codepoints = line.split(';') codepoints = ''.join(chr(int(cp, 16)) for cp in codepoints.split()) self.assertEqual(unicodedata.lookup(seqname), codepoints) with self.assertRaises(SyntaxError): self.checkletter(seqname, None) with self.assertRaises(KeyError): unicodedata.ucd_3_2_0.lookup(seqname)
Example #3
Source File: test_ucn.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 6 votes |
def test_named_sequences_full(self): # Check all the named sequences url = ("http://www.pythontest.net/unicode/%s/NamedSequences.txt" % unicodedata.unidata_version) try: testdata = support.open_urlresource(url, encoding="utf-8", check=check_version) except (OSError, HTTPException): self.skipTest("Could not retrieve " + url) self.addCleanup(testdata.close) for line in testdata: line = line.strip() if not line or line.startswith('#'): continue seqname, codepoints = line.split(';') codepoints = ''.join(chr(int(cp, 16)) for cp in codepoints.split()) self.assertEqual(unicodedata.lookup(seqname), codepoints) with self.assertRaises(SyntaxError): self.checkletter(seqname, None) with self.assertRaises(KeyError): unicodedata.ucd_3_2_0.lookup(seqname)
Example #4
Source File: test_normalization.py From ironpython2 with Apache License 2.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #5
Source File: test_normalization.py From BinderFilter with MIT License | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #6
Source File: test_normalization.py From oss-ftp with MIT License | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #7
Source File: test_normalization.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #8
Source File: test_normalization.py From ironpython3 with Apache License 2.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #9
Source File: test_normalization.py From gcblue with BSD 3-Clause "New" or "Revised" License | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #10
Source File: test_normalization.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #11
Source File: test_normalization.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #12
Source File: test_normalization.py From android_universal with MIT License | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr
Example #13
Source File: test_normalization.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def check_version(testfile): hdr = testfile.readline() return unidata_version in hdr