mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	#17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
This commit is contained in:
		
							parent
							
								
									1eafd1076e
								
							
						
					
					
						commit
						c2ecac4787
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		|  | @ -3,21 +3,22 @@ | |||
| # Skip test if _sqlite3 module not installed | ||||
| test.support.import_module('_sqlite3') | ||||
| 
 | ||||
| import unittest | ||||
| import sqlite3 | ||||
| from sqlite3.test import (dbapi, types, userfunctions, | ||||
|                                 factory, transactions, hooks, regression, | ||||
|                                 dump) | ||||
| 
 | ||||
| def test_main(): | ||||
| def load_tests(*args): | ||||
|     if test.support.verbose: | ||||
|         print("test_sqlite: testing with version", | ||||
|               "{!r}, sqlite_version {!r}".format(sqlite3.version, | ||||
|                                                  sqlite3.sqlite_version)) | ||||
|     test.support.run_unittest(dbapi.suite(), types.suite(), | ||||
|     return unittest.TestSuite([dbapi.suite(), types.suite(), | ||||
|                                userfunctions.suite(), | ||||
|                                factory.suite(), transactions.suite(), | ||||
|                                hooks.suite(), regression.suite(), | ||||
|                                dump.suite()) | ||||
|                                dump.suite()]) | ||||
| 
 | ||||
| if __name__ == "__main__": | ||||
|     test_main() | ||||
|     unittest.main() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ezio Melotti
						Ezio Melotti