mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed test failures when running in a narrow Python build.
This commit is contained in:
		| @@ -1,9 +1,13 @@ | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from unittest import skipUnless | ||||
|  | ||||
| from django.test import SimpleTestCase | ||||
| from django.utils import six, text | ||||
|  | ||||
| IS_WIDE_BUILD = (len('\U0001F4A9') == 1) | ||||
|  | ||||
|  | ||||
| class TestUtilsText(SimpleTestCase): | ||||
|  | ||||
| @@ -156,6 +160,7 @@ class TestUtilsText(SimpleTestCase): | ||||
|         self.assertEqual(text.javascript_quote(input, quote_double_quotes=True), | ||||
|                          '"Text"') | ||||
|  | ||||
|     @skipUnless(IS_WIDE_BUILD) | ||||
|     def test_javascript_quote_unicode(self): | ||||
|         input = "<script>alert('Hello \\xff.\n Wel𝕃come\there\r');</script>" | ||||
|         output = r"<script>alert(\'Hello \\xff.\n Wel𝕃come\there\r\');<\/script>" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user