Ver Fonte

Fix tests when running in ASCII environment. (#433).

Jelmer Vernooij há 8 anos atrás
pai
commit
ea06b4936f
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      dulwich/tests/test_refs.py

+ 1 - 1
dulwich/tests/test_refs.py

@@ -441,7 +441,7 @@ class DiskRefsContainerTests(RefsContainerTests, TestCase):
     def test_non_ascii(self):
         try:
             encoded_ref = u'refs/tags/schön'.encode(sys.getfilesystemencoding())
-        except UnicodeDecodeError:
+        except UnicodeEncodeError:
             raise SkipTest("filesystem encoding doesn't support special character")
         p = os.path.join(self._repo.path, 'refs', 'tags', 'schön')
         with open(p, 'w') as f: