Explorar o código

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

Jelmer Vernooij %!s(int64=9) %!d(string=hai) anos
pai
achega
ea06b4936f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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: