mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	 0c824cf295
			
		
	
	0c824cf295
	
	
	
		
			
			* remove type comment where type is annotated * move function tests * remove six from tests * add none annotations * add more types * change mock (so that mypy understands it)
		
			
				
	
	
		
			15 lines
		
	
	
		
			381 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			381 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/usr/bin/python
 | |
| 
 | |
| import pytest
 | |
| 
 | |
| import escpos.printer as printer
 | |
| from escpos.exceptions import CashDrawerError
 | |
| 
 | |
| 
 | |
| def test_raise_CashDrawerError() -> None:
 | |
|     """should raise an error if the sequence is invalid."""
 | |
|     instance = printer.Dummy()
 | |
|     with pytest.raises(CashDrawerError):
 | |
|         # call with sequence that is too long
 | |
|         instance.cashdraw([1, 1, 1, 1, 1, 1])
 |