diff options
| author | Tim Graham <timograham@gmail.com> | 2017-03-09 09:55:55 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-03-09 10:09:00 -0500 |
| commit | e9ba8563c115ea331e7fb52b26ddb9cced5c7c94 (patch) | |
| tree | 8f00f21202c500fad1b714bc3eb8cd0460e5b4a1 | |
| parent | 993406770ad3dab0728297d7de84d7e394373bd9 (diff) | |
[1.11.x] Reverted "Refs #16682 -- Tested transaction.atomic() with KeyboardInterrupt."
This reverts commit d895fc9ac01db3d3420aa7c943949fe17b3ce028 since the
test is problematic as described in the ticket.
Backport of dfbdba924fd7cf12ce92f7a86b97590d25b75733 from master
| -rw-r--r-- | tests/transactions/tests.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py index 7dc21cca4f..d2694f2f44 100644 --- a/tests/transactions/tests.py +++ b/tests/transactions/tests.py @@ -1,7 +1,5 @@ from __future__ import unicode_literals -import os -import signal import sys import threading import time @@ -220,18 +218,6 @@ class AtomicTests(TransactionTestCase): transaction.savepoint_rollback(sid) self.assertQuerysetEqual(Reporter.objects.all(), ['<Reporter: Tintin>']) - @skipIf(sys.platform.startswith('win'), "Windows doesn't have signals.") - def test_rollback_on_keyboardinterrupt(self): - try: - with transaction.atomic(): - Reporter.objects.create(first_name='Tintin') - # Send SIGINT (simulate Ctrl-C). One call isn't enough. - os.kill(os.getpid(), signal.SIGINT) - os.kill(os.getpid(), signal.SIGINT) - except KeyboardInterrupt: - pass - self.assertEqual(Reporter.objects.all().count(), 0) - class AtomicInsideTransactionTests(AtomicTests): """All basic tests for atomic should also pass within an existing transaction.""" |
