| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,7 +120,10 @@ def test_surrogate_pairs(self): | |||
| 120 | 120 | s_sp_2 = _u('\udce3') | |
| 121 | 121 | s_sp = s_sp_1 + s_sp_2 | |
| 122 | 122 | ||
| 123 | - self.assertEqual(s.encode('utf16'), s_sp.encode('utf16')) | ||
| 123 | + if sys.version_info < (3,4): | ||
| 124 | + self.assertEqual(s.encode('utf16'), s_sp.encode('utf16')) | ||
| 125 | + else: | ||
| 126 | + self.assertEqual(s.encode('utf16'), s_sp.encode('utf16', errors='surrogatepass')) | ||
| 124 | 127 | ||
| 125 | 128 | wlog = WarningLogger() | |
| 126 | 129 | wlog.start("Surrogate character") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments