mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #34986 -- Removed redundant CustomChoicesTests.test_timezone_unsupported().
This test relied on the behavior of subclassing `datetime.timezone` which is not permitted by the C-extension version of CPython's `datetime` module. This restriction isn't enforced by the pure Python version, nor by PyPy. See https://github.com/python/cpython/issues/112451 It's not critical, and doesn't test any Django behavior, so just remove it.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							f5f55b41af
						
					
				
				
					commit
					06c5cb1284
				
			| @@ -316,13 +316,6 @@ class CustomChoicesTests(SimpleTestCase): | ||||
|             class Boolean(bool, models.Choices): | ||||
|                 pass | ||||
|  | ||||
|     def test_timezone_unsupported(self): | ||||
|         msg = "type 'datetime.timezone' is not an acceptable base type" | ||||
|         with self.assertRaisesMessage(TypeError, msg): | ||||
|  | ||||
|             class Timezone(datetime.timezone, models.Choices): | ||||
|                 pass | ||||
|  | ||||
|     def test_uuid_unsupported(self): | ||||
|         with self.assertRaises(TypeError): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user