def name(self):
     if self.req is None:
         return None
     return native_str(pkg_resources.safe_name(self.req.name))
Example #2
0
def test_to_native_str_type():
    some_bytes = b"test\xE9 et approuv\xC3\xE9"
    some_unicode = b"test\xE9 et approuv\xE9".decode('iso-8859-15')
    assert isinstance(native_str(some_bytes, True), str)
    assert isinstance(native_str(some_unicode, True), str)
Example #3
0
def test_to_native_str_type():
    some_bytes = b"test\xE9 et approuv\xC3\xE9"
    some_unicode = b"test\xE9 et approuv\xE9".decode('iso-8859-15')
    assert isinstance(native_str(some_bytes, True), str)
    assert isinstance(native_str(some_unicode, True), str)
 def name(self):
     if self.req is None:
         return None
     return native_str(pkg_resources.safe_name(self.req.name))