Exemplo n.º 1
0
 def name(self):
     if self.req is None:
         return None
     return native_str(self.req.project_name)
Exemplo n.º 2
0
 def name(self):
     if self.req is None:
         return None
     return native_str(self.req.project_name)
Exemplo n.º 3
0
 def name(self):
     if self.req is None:
         return None
     return native_str(pkg_resources.safe_name(self.req.name))
Exemplo n.º 4
0
 def name(self):
     if self.req is None:
         return None
     return native_str(pkg_resources.safe_name(self.req.name))
Exemplo n.º 5
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)
Exemplo n.º 6
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)