mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Move cli interface code in package
This commit is contained in:
		
							
								
								
									
										5
									
								
								app/tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/tests/__init__.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
from flask import Blueprint
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bp = Blueprint('tests', __name__)
 | 
			
		||||
from . import cli
 | 
			
		||||
							
								
								
									
										9
									
								
								app/tests/cli.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/tests/cli.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
from unittest import TestLoader, TextTestRunner
 | 
			
		||||
from unittest.suite import TestSuite
 | 
			
		||||
from . import bp
 | 
			
		||||
 | 
			
		||||
@bp.cli.command('run')
 | 
			
		||||
def run_test():
 | 
			
		||||
    ''' Run unit tests. '''
 | 
			
		||||
    tests: TestSuite = TestLoader().discover('tests')
 | 
			
		||||
    TextTestRunner(verbosity=2).run(tests)
 | 
			
		||||
		Reference in New Issue
	
	Block a user