2015-06-24 07:55:52 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2015-04-15 19:07:19 -07:00
|
|
|
from fontTools.misc.py23 import *
|
2016-02-16 14:39:44 +01:00
|
|
|
from fontTools.misc import sstruct
|
2016-10-04 14:54:35 +01:00
|
|
|
from fontTools.misc.loggingTools import CapturingLogHandler
|
2017-04-18 19:18:46 +02:00
|
|
|
from fontTools.misc.testTools import FakeFont
|
|
|
|
from fontTools.misc.xmlWriter import XMLWriter
|
2016-02-16 14:39:44 +01:00
|
|
|
import struct
|
2015-04-15 19:07:19 -07:00
|
|
|
import unittest
|
2017-04-18 19:18:46 +02:00
|
|
|
from fontTools.ttLib import newTable
|
2017-01-15 21:45:57 +00:00
|
|
|
from fontTools.ttLib.tables._n_a_m_e import (
|
|
|
|
table__n_a_m_e, NameRecord, nameRecordFormat, nameRecordSize, makeName, log)
|
2015-06-24 07:55:52 +02:00
|
|
|
|
|
|
|
|
2017-04-20 17:46:42 +02:00
|
|
|
def names(nameTable):
|
|
|
|
result = [(n.nameID, n.platformID, n.platEncID, n.langID, n.string)
|
|
|
|
for n in nameTable.names]
|
|
|
|
result.sort()
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
2015-06-24 07:55:52 +02:00
|
|
|
class NameTableTest(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_getDebugName(self):
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.names = [
|
|
|
|
makeName("Bold", 258, 1, 0, 0), # Mac, MacRoman, English
|
|
|
|
makeName("Gras", 258, 1, 0, 1), # Mac, MacRoman, French
|
|
|
|
makeName("Fett", 258, 1, 0, 2), # Mac, MacRoman, German
|
|
|
|
makeName("Sem Fracções", 292, 1, 0, 8) # Mac, MacRoman, Portuguese
|
|
|
|
]
|
|
|
|
self.assertEqual("Bold", table.getDebugName(258))
|
|
|
|
self.assertEqual("Sem Fracções", table.getDebugName(292))
|
|
|
|
self.assertEqual(None, table.getDebugName(999))
|
|
|
|
|
2015-10-01 10:12:29 +01:00
|
|
|
def test_setName(self):
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.setName("Version 1.000", 5, 3, 1, 0x409)
|
|
|
|
table.setName("寬鬆", 276, 1, 2, 0x13)
|
2015-10-01 11:41:46 +01:00
|
|
|
self.assertEqual("Regular", table.getName(2, 1, 0, 0).toUnicode())
|
|
|
|
self.assertEqual("Version 1.000", table.getName(5, 3, 1, 0x409).toUnicode())
|
|
|
|
self.assertEqual("寬鬆", table.getName(276, 1, 2, 0x13).toUnicode())
|
2015-10-01 10:12:29 +01:00
|
|
|
self.assertTrue(len(table.names) == 3)
|
|
|
|
table.setName("緊縮", 276, 1, 2, 0x13)
|
2015-10-01 11:41:46 +01:00
|
|
|
self.assertEqual("緊縮", table.getName(276, 1, 2, 0x13).toUnicode())
|
2015-10-01 10:12:29 +01:00
|
|
|
self.assertTrue(len(table.names) == 3)
|
2016-10-04 14:54:35 +01:00
|
|
|
# passing bytes issues a warning
|
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
table.setName(b"abc", 0, 1, 0, 0)
|
|
|
|
self.assertTrue(
|
|
|
|
len([r for r in captor.records if "string is bytes" in r.msg]) == 1)
|
|
|
|
# anything other than unicode or bytes raises an error
|
|
|
|
with self.assertRaises(TypeError):
|
|
|
|
table.setName(1.000, 5, 1, 0, 0)
|
|
|
|
|
|
|
|
def test_addName(self):
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
nameIDs = []
|
|
|
|
for string in ("Width", "Weight", "Custom"):
|
|
|
|
nameIDs.append(table.addName(string))
|
|
|
|
|
|
|
|
self.assertEqual(nameIDs[0], 256)
|
|
|
|
self.assertEqual(nameIDs[1], 257)
|
|
|
|
self.assertEqual(nameIDs[2], 258)
|
|
|
|
self.assertEqual(len(table.names), 6)
|
|
|
|
self.assertEqual(table.names[0].string, "Width")
|
|
|
|
self.assertEqual(table.names[1].string, "Width")
|
|
|
|
self.assertEqual(table.names[2].string, "Weight")
|
|
|
|
self.assertEqual(table.names[3].string, "Weight")
|
|
|
|
self.assertEqual(table.names[4].string, "Custom")
|
|
|
|
self.assertEqual(table.names[5].string, "Custom")
|
|
|
|
|
|
|
|
with self.assertRaises(ValueError):
|
|
|
|
table.addName('Invalid nameID', minNameID=32767)
|
|
|
|
with self.assertRaises(TypeError):
|
|
|
|
table.addName(b"abc") # must be unicode string
|
2015-10-01 10:12:29 +01:00
|
|
|
|
2019-09-10 09:45:13 +01:00
|
|
|
def test_removeNames(self):
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.setName("Regular", 2, 3, 1, 0x409)
|
|
|
|
table.removeNames(nameID=2)
|
|
|
|
self.assertEqual(table.names, [])
|
|
|
|
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("FamilyName", 1, 1, 0, 0)
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.setName("FamilyName", 1, 3, 1, 0x409)
|
|
|
|
table.setName("Regular", 2, 3, 1, 0x409)
|
|
|
|
table.removeNames(platformID=1)
|
|
|
|
self.assertEqual(len(table.names), 2)
|
|
|
|
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("FamilyName", 1, 1, 0, 0)
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.removeNames(nameID=1)
|
|
|
|
self.assertEqual(len(table.names), 1)
|
|
|
|
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("FamilyName", 1, 1, 0, 0)
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.removeNames(2, 1, 0, 0)
|
|
|
|
self.assertEqual(len(table.names), 1)
|
|
|
|
|
|
|
|
table = table__n_a_m_e()
|
|
|
|
table.setName("FamilyName", 1, 1, 0, 0)
|
|
|
|
table.setName("Regular", 2, 1, 0, 0)
|
|
|
|
table.removeNames()
|
|
|
|
self.assertEqual(len(table.names), 2)
|
|
|
|
|
2017-04-18 19:18:46 +02:00
|
|
|
def test_addMultilingualName(self):
|
2017-04-20 17:46:42 +02:00
|
|
|
# Microsoft Windows has language codes for “English” (en)
|
|
|
|
# and for “Standard German as used in Switzerland” (de-CH).
|
|
|
|
# In this case, we expect that the implementation just
|
|
|
|
# encodes the name for the Windows platform; Apple platforms
|
|
|
|
# have been able to decode Windows names since the early days
|
|
|
|
# of OSX (~2001). However, Windows has no language code for
|
|
|
|
# “Swiss German as used in Liechtenstein” (gsw-LI), so we
|
|
|
|
# expect that the implementation populates the 'ltag' table
|
|
|
|
# to represent that particular, rather exotic BCP47 code.
|
2017-04-18 19:18:46 +02:00
|
|
|
font = FakeFont(glyphs=[".notdef", "A"])
|
|
|
|
nameTable = font.tables['name'] = newTable("name")
|
2017-04-20 17:46:42 +02:00
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
widthID = nameTable.addMultilingualName({
|
|
|
|
"en": "Width",
|
|
|
|
"de-CH": "Breite",
|
|
|
|
"gsw-LI": "Bräiti",
|
2018-11-02 12:12:57 +01:00
|
|
|
}, ttFont=font, mac=False)
|
2017-04-20 17:46:42 +02:00
|
|
|
self.assertEqual(widthID, 256)
|
|
|
|
xHeightID = nameTable.addMultilingualName({
|
|
|
|
"en": "X-Height",
|
|
|
|
"gsw-LI": "X-Hööchi"
|
2018-11-02 12:12:57 +01:00
|
|
|
}, ttFont=font, mac=False)
|
2017-04-20 17:46:42 +02:00
|
|
|
self.assertEqual(xHeightID, 257)
|
|
|
|
captor.assertRegex("cannot add Windows name in language gsw-LI")
|
|
|
|
self.assertEqual(names(nameTable), [
|
|
|
|
(256, 0, 4, 0, "Bräiti"),
|
2017-04-18 19:18:46 +02:00
|
|
|
(256, 3, 1, 0x0409, "Width"),
|
|
|
|
(256, 3, 1, 0x0807, "Breite"),
|
2017-04-20 17:46:42 +02:00
|
|
|
(257, 0, 4, 0, "X-Hööchi"),
|
2017-04-18 19:18:46 +02:00
|
|
|
(257, 3, 1, 0x0409, "X-Height"),
|
|
|
|
])
|
|
|
|
self.assertEqual(set(font.tables.keys()), {"ltag", "name"})
|
2017-04-20 17:46:42 +02:00
|
|
|
self.assertEqual(font["ltag"].tags, ["gsw-LI"])
|
|
|
|
|
|
|
|
def test_addMultilingualName_legacyMacEncoding(self):
|
|
|
|
# Windows has no language code for Latin; MacOS has a code;
|
|
|
|
# and we actually can convert the name to the legacy MacRoman
|
|
|
|
# encoding. In this case, we expect that the name gets encoded
|
|
|
|
# as Macintosh name (platformID 1) with the corresponding Mac
|
|
|
|
# language code (133); the 'ltag' table should not be used.
|
|
|
|
font = FakeFont(glyphs=[".notdef", "A"])
|
|
|
|
nameTable = font.tables['name'] = newTable("name")
|
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
nameTable.addMultilingualName({"la": "SPQR"},
|
|
|
|
ttFont=font)
|
|
|
|
captor.assertRegex("cannot add Windows name in language la")
|
|
|
|
self.assertEqual(names(nameTable), [(256, 1, 0, 131, "SPQR")])
|
|
|
|
self.assertNotIn("ltag", font.tables.keys())
|
|
|
|
|
|
|
|
def test_addMultilingualName_legacyMacEncodingButUnencodableName(self):
|
|
|
|
# Windows has no language code for Latin; MacOS has a code;
|
|
|
|
# but we cannot encode the name into this encoding because
|
|
|
|
# it contains characters that are not representable.
|
|
|
|
# In this case, we expect that the name gets encoded as
|
|
|
|
# Unicode name (platformID 0) with the language tag being
|
|
|
|
# added to the 'ltag' table.
|
|
|
|
font = FakeFont(glyphs=[".notdef", "A"])
|
|
|
|
nameTable = font.tables['name'] = newTable("name")
|
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
nameTable.addMultilingualName({"la": "ⱾƤℚⱤ"},
|
|
|
|
ttFont=font)
|
|
|
|
captor.assertRegex("cannot add Windows name in language la")
|
|
|
|
self.assertEqual(names(nameTable), [(256, 0, 4, 0, "ⱾƤℚⱤ")])
|
|
|
|
self.assertIn("ltag", font.tables)
|
|
|
|
self.assertEqual(font["ltag"].tags, ["la"])
|
|
|
|
|
|
|
|
def test_addMultilingualName_legacyMacEncodingButNoCodec(self):
|
|
|
|
# Windows has no language code for “Azeri written in the
|
|
|
|
# Arabic script” (az-Arab); MacOS would have a code (50);
|
|
|
|
# but we cannot encode the name into the legacy encoding
|
|
|
|
# because we have no codec for MacArabic in fonttools.
|
|
|
|
# In this case, we expect that the name gets encoded as
|
|
|
|
# Unicode name (platformID 0) with the language tag being
|
|
|
|
# added to the 'ltag' table.
|
|
|
|
font = FakeFont(glyphs=[".notdef", "A"])
|
|
|
|
nameTable = font.tables['name'] = newTable("name")
|
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
nameTable.addMultilingualName({"az-Arab": "آذربايجان ديلی"},
|
|
|
|
ttFont=font)
|
|
|
|
captor.assertRegex("cannot add Windows name in language az-Arab")
|
|
|
|
self.assertEqual(names(nameTable), [(256, 0, 4, 0, "آذربايجان ديلی")])
|
|
|
|
self.assertIn("ltag", font.tables)
|
|
|
|
self.assertEqual(font["ltag"].tags, ["az-Arab"])
|
|
|
|
|
|
|
|
def test_addMultilingualName_noTTFont(self):
|
|
|
|
# If the ttFont argument is not passed, the implementation
|
|
|
|
# should add whatever names it can, but it should not crash
|
|
|
|
# just because it cannot build an ltag table.
|
|
|
|
nameTable = newTable("name")
|
|
|
|
with CapturingLogHandler(log, "WARNING") as captor:
|
|
|
|
nameTable.addMultilingualName({"en": "A", "la": "ⱾƤℚⱤ"})
|
|
|
|
captor.assertRegex("cannot store language la into 'ltag' table")
|
2017-04-18 19:18:46 +02:00
|
|
|
|
2016-02-16 14:39:44 +01:00
|
|
|
def test_decompile_badOffset(self):
|
2019-03-06 16:47:16 +01:00
|
|
|
# https://github.com/fonttools/fonttools/issues/525
|
2016-02-16 14:39:44 +01:00
|
|
|
table = table__n_a_m_e()
|
|
|
|
badRecord = {
|
|
|
|
"platformID": 1,
|
|
|
|
"platEncID": 3,
|
|
|
|
"langID": 7,
|
|
|
|
"nameID": 1,
|
|
|
|
"length": 3,
|
|
|
|
"offset": 8765 # out of range
|
|
|
|
}
|
|
|
|
data = bytesjoin([
|
2018-02-22 15:01:04 -08:00
|
|
|
struct.pack(tostr(">HHH"), 1, 1, 6 + nameRecordSize),
|
2016-02-16 14:39:44 +01:00
|
|
|
sstruct.pack(nameRecordFormat, badRecord)])
|
|
|
|
table.decompile(data, ttFont=None)
|
|
|
|
self.assertEqual(table.names, [])
|
|
|
|
|
2015-06-24 07:55:52 +02:00
|
|
|
|
|
|
|
class NameRecordTest(unittest.TestCase):
|
2015-04-15 23:54:01 -07:00
|
|
|
|
|
|
|
def test_toUnicode_utf16be(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName("Foo Bold", 111, 0, 2, 7)
|
2015-04-24 12:48:37 -07:00
|
|
|
self.assertEqual("utf_16_be", name.getEncoding())
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertEqual("Foo Bold", name.toUnicode())
|
|
|
|
|
|
|
|
def test_toUnicode_macroman(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName("Foo Italic", 222, 1, 0, 7) # MacRoman
|
2015-04-19 04:24:55 -07:00
|
|
|
self.assertEqual("mac_roman", name.getEncoding())
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertEqual("Foo Italic", name.toUnicode())
|
|
|
|
|
2015-04-16 18:24:07 -07:00
|
|
|
def test_toUnicode_macromanian(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"Foo Italic\xfb", 222, 1, 0, 37) # Mac Romanian
|
2015-04-24 12:32:20 -07:00
|
|
|
self.assertEqual("mac_romanian", name.getEncoding())
|
2015-04-16 18:24:07 -07:00
|
|
|
self.assertEqual("Foo Italic"+unichr(0x02DA), name.toUnicode())
|
|
|
|
|
2015-04-15 23:54:01 -07:00
|
|
|
def test_toUnicode_UnicodeDecodeError(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"\1", 111, 0, 2, 7)
|
2015-04-24 12:48:37 -07:00
|
|
|
self.assertEqual("utf_16_be", name.getEncoding())
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertRaises(UnicodeDecodeError, name.toUnicode)
|
|
|
|
|
2015-04-15 19:07:19 -07:00
|
|
|
def toXML(self, name):
|
2015-08-07 16:16:49 +01:00
|
|
|
writer = XMLWriter(BytesIO())
|
2015-04-15 19:07:19 -07:00
|
|
|
name.toXML(writer, ttFont=None)
|
2015-04-19 04:24:55 -07:00
|
|
|
xml = writer.file.getvalue().decode("utf_8").strip()
|
|
|
|
return xml.split(writer.newlinestr.decode("utf_8"))[1:]
|
2015-04-15 19:07:19 -07:00
|
|
|
|
|
|
|
def test_toXML_utf16be(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName("Foo Bold", 111, 0, 2, 7)
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertEqual([
|
2015-04-15 19:07:19 -07:00
|
|
|
'<namerecord nameID="111" platformID="0" platEncID="2" langID="0x7">',
|
|
|
|
' Foo Bold',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-22 01:49:15 -07:00
|
|
|
def test_toXML_utf16be_odd_length1(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"\0F\0o\0o\0", 111, 0, 2, 7)
|
2015-04-22 01:12:05 -07:00
|
|
|
self.assertEqual([
|
2015-04-22 01:49:15 -07:00
|
|
|
'<namerecord nameID="111" platformID="0" platEncID="2" langID="0x7">',
|
|
|
|
' Foo',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
|
|
|
def test_toXML_utf16be_odd_length2(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"\0Fooz", 111, 0, 2, 7)
|
2015-04-22 01:49:15 -07:00
|
|
|
self.assertEqual([
|
|
|
|
'<namerecord nameID="111" platformID="0" platEncID="2" langID="0x7">',
|
|
|
|
' Fooz',
|
2015-04-22 01:12:05 -07:00
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-22 02:22:11 -07:00
|
|
|
def test_toXML_utf16be_double_encoded(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"\0\0\0F\0\0\0o", 111, 0, 2, 7)
|
2015-04-22 02:22:11 -07:00
|
|
|
self.assertEqual([
|
|
|
|
'<namerecord nameID="111" platformID="0" platEncID="2" langID="0x7">',
|
|
|
|
' Fo',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-15 19:07:19 -07:00
|
|
|
def test_toXML_macroman(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName("Foo Italic", 222, 1, 0, 7) # MacRoman
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertEqual([
|
2015-04-15 19:07:19 -07:00
|
|
|
'<namerecord nameID="222" platformID="1" platEncID="0" langID="0x7" unicode="True">',
|
|
|
|
' Foo Italic',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-22 02:15:51 -07:00
|
|
|
def test_toXML_macroman_actual_utf16be(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName("\0F\0o\0o", 222, 1, 0, 7)
|
2015-04-22 02:15:51 -07:00
|
|
|
self.assertEqual([
|
|
|
|
'<namerecord nameID="222" platformID="1" platEncID="0" langID="0x7" unicode="True">',
|
|
|
|
' Foo',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-16 17:09:49 -07:00
|
|
|
def test_toXML_unknownPlatEncID_nonASCII(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"B\x8arli", 333, 1, 9876, 7) # Unknown Mac encodingID
|
2015-04-15 23:54:01 -07:00
|
|
|
self.assertEqual([
|
2015-04-15 19:07:19 -07:00
|
|
|
'<namerecord nameID="333" platformID="1" platEncID="9876" langID="0x7" unicode="False">',
|
|
|
|
' BŠrli',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-16 17:09:49 -07:00
|
|
|
def test_toXML_unknownPlatEncID_ASCII(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b"Barli", 333, 1, 9876, 7) # Unknown Mac encodingID
|
2015-04-16 17:09:49 -07:00
|
|
|
self.assertEqual([
|
|
|
|
'<namerecord nameID="333" platformID="1" platEncID="9876" langID="0x7" unicode="True">',
|
|
|
|
' Barli',
|
|
|
|
'</namerecord>'
|
|
|
|
], self.toXML(name))
|
|
|
|
|
2015-04-16 01:17:06 -07:00
|
|
|
def test_encoding_macroman_misc(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName('', 123, 1, 0, 17) # Mac Turkish
|
2015-04-19 04:24:55 -07:00
|
|
|
self.assertEqual(name.getEncoding(), "mac_turkish")
|
2015-04-16 01:17:06 -07:00
|
|
|
name.langID = 37
|
2015-04-24 12:32:20 -07:00
|
|
|
self.assertEqual(name.getEncoding(), "mac_romanian")
|
2015-04-16 18:24:07 -07:00
|
|
|
name.langID = 45 # Other
|
2015-04-19 04:24:55 -07:00
|
|
|
self.assertEqual(name.getEncoding(), "mac_roman")
|
2015-04-15 19:07:19 -07:00
|
|
|
|
2015-04-16 03:18:20 -07:00
|
|
|
def test_extended_mac_encodings(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b'\xfe', 123, 1, 1, 0) # Mac Japanese
|
2015-04-16 03:18:20 -07:00
|
|
|
self.assertEqual(name.toUnicode(), unichr(0x2122))
|
|
|
|
|
2015-04-16 18:24:07 -07:00
|
|
|
def test_extended_unknown(self):
|
2015-06-24 07:55:52 +02:00
|
|
|
name = makeName(b'\xfe', 123, 10, 11, 12)
|
2015-04-16 18:24:07 -07:00
|
|
|
self.assertEqual(name.getEncoding(), "ascii")
|
|
|
|
self.assertEqual(name.getEncoding(None), None)
|
|
|
|
self.assertEqual(name.getEncoding(default=None), None)
|
|
|
|
|
2015-04-15 23:54:01 -07:00
|
|
|
if __name__ == "__main__":
|
2017-01-11 13:05:35 +00:00
|
|
|
import sys
|
|
|
|
sys.exit(unittest.main())
|