mirror of https://github.com/django/django.git
Fixed #20016: worked around Jython not having a buffer.
This commit is contained in:
parent
15c3906eeb
commit
35cab0f8e4
|
@ -414,8 +414,12 @@ else:
|
|||
_assertRaisesRegex = "assertRaisesRegexp"
|
||||
_assertRegex = "assertRegexpMatches"
|
||||
# memoryview and buffer are not stricly equivalent, but should be fine for
|
||||
# django core usage (mainly BinaryField)
|
||||
memoryview = buffer
|
||||
# django core usage (mainly BinaryField). However, Jython doesn't support
|
||||
# buffer (see http://bugs.jython.org/issue1521), so we have to be careful.
|
||||
if sys.platform.startswith('java'):
|
||||
memoryview = memoryview
|
||||
else:
|
||||
memoryview = buffer
|
||||
|
||||
|
||||
def assertRaisesRegex(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue