mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-30 07:17:28 +03:00 
			
		
		
		
	Don't try to use unittest2
Modules importing unittest directly would miss the monkeypatch: see ticket #516.
This commit is contained in:
		
							parent
							
								
									455f51c36c
								
							
						
					
					
						commit
						5a65ff5cf4
					
				|  | @ -22,22 +22,15 @@ | ||||||
| # License for more details. | # License for more details. | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Use unittest2 if available. Otherwise mock a skip facility with warnings. |  | ||||||
| 
 |  | ||||||
| import re | import re | ||||||
| import os | import os | ||||||
| import sys | import sys | ||||||
| import select | import select | ||||||
| import platform | import platform | ||||||
|  | import unittest | ||||||
| from functools import wraps | from functools import wraps | ||||||
| from testconfig import dsn, repl_dsn | from testconfig import dsn, repl_dsn | ||||||
| 
 | 
 | ||||||
| try: |  | ||||||
|     import unittest2 |  | ||||||
|     unittest = unittest2 |  | ||||||
| except ImportError: |  | ||||||
|     import unittest |  | ||||||
|     unittest2 = None |  | ||||||
| 
 | 
 | ||||||
| if hasattr(unittest, 'skipIf'): | if hasattr(unittest, 'skipIf'): | ||||||
|     skip = unittest.skip |     skip = unittest.skip | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user