mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	gh-111201: Skip pyrepl Windows tests earlier (#119848)
Don't attempt to load pyrepl Windows console if platforms others than Windows. For example, the import can fail if ctypes is missing.
This commit is contained in:
		
							parent
							
								
									4c387a76f3
								
							
						
					
					
						commit
						91601a5596
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,11 @@
 | 
			
		|||
import itertools
 | 
			
		||||
import sys
 | 
			
		||||
import unittest
 | 
			
		||||
 | 
			
		||||
if sys.platform != 'win32':
 | 
			
		||||
    raise unittest.SkipTest("test only relevant on win32")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import itertools
 | 
			
		||||
from functools import partial
 | 
			
		||||
from typing import Iterable
 | 
			
		||||
from unittest import TestCase
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +27,6 @@ except ImportError:
 | 
			
		|||
    pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@unittest.skipIf(sys.platform != "win32", "Test class specifically for Windows")
 | 
			
		||||
class WindowsConsoleTests(TestCase):
 | 
			
		||||
    def console(self, events, **kwargs) -> Console:
 | 
			
		||||
        console = WindowsConsole()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue