mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Refs #31370 -- Added test for pickling RemoteTestResult.
This commit is contained in:
committed by
Mariusz Felisiak
parent
03d0f12c82
commit
92975bcd5f
@@ -1,3 +1,4 @@
|
|||||||
|
import pickle
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from django.test import SimpleTestCase
|
from django.test import SimpleTestCase
|
||||||
@@ -51,6 +52,11 @@ class SampleFailingSubtest(SimpleTestCase):
|
|||||||
|
|
||||||
class RemoteTestResultTest(SimpleTestCase):
|
class RemoteTestResultTest(SimpleTestCase):
|
||||||
|
|
||||||
|
def test_picklable(self):
|
||||||
|
result = RemoteTestResult()
|
||||||
|
loaded_result = pickle.loads(pickle.dumps(result))
|
||||||
|
self.assertEqual(result.events, loaded_result.events)
|
||||||
|
|
||||||
def test_pickle_errors_detection(self):
|
def test_pickle_errors_detection(self):
|
||||||
picklable_error = RuntimeError('This is fine')
|
picklable_error = RuntimeError('This is fine')
|
||||||
not_unpicklable_error = ExceptionThatFailsUnpickling('arg')
|
not_unpicklable_error = ExceptionThatFailsUnpickling('arg')
|
||||||
|
|||||||
Reference in New Issue
Block a user