mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.9.x] Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.
Backport of 1c5f4e86bc from master
			
			
This commit is contained in:
		| @@ -197,6 +197,7 @@ class GraphTests(SimpleTestCase): | ||||
|         leaf = expected[-1] | ||||
|  | ||||
|         with warnings.catch_warnings(record=True) as w: | ||||
|             warnings.simplefilter('always', RuntimeWarning) | ||||
|             forwards_plan = graph.forwards_plan(leaf) | ||||
|  | ||||
|         self.assertEqual(len(w), 1) | ||||
| @@ -205,6 +206,7 @@ class GraphTests(SimpleTestCase): | ||||
|         self.assertEqual(expected, forwards_plan) | ||||
|  | ||||
|         with warnings.catch_warnings(record=True) as w: | ||||
|             warnings.simplefilter('always', RuntimeWarning) | ||||
|             backwards_plan = graph.backwards_plan(root) | ||||
|  | ||||
|         self.assertEqual(len(w), 1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user