File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 44import  os 
55import  shutil 
66import  subprocess 
7+ import  sys 
78
89import  pytest 
910
@@ -36,7 +37,8 @@ def test_rule_on_short_path():
3637
3738@pytest .mark .parametrize ("source_file" , TEST_FILES ) 
3839def  test_unasync (tmpdir , source_file ):
39- 
40+     if  source_file  ==  'removals.py'  and  sys .version_info [2 ] <  8 :
41+         pytest .skip ("unasync: remove feature is not supported in versions of Python less than 3.8" )
4042    rule  =  unasync .Rule (fromdir = ASYNC_DIR , todir = str (tmpdir ))
4143    rule ._unasync_file (os .path .join (ASYNC_DIR , source_file ))
4244
@@ -56,6 +58,8 @@ def test_unasync_files(tmpdir):
5658    )
5759
5860    for  source_file  in  TEST_FILES :
61+         if  source_file  ==  'removals.py'  and  sys .version_info [2 ] <  8 :
62+             continue   # unasync-remove feature is not supported in versions of Python less than 3.8 
5963        encoding  =  "latin-1"  if  "encoding"  in  source_file  else  "utf-8" 
6064        with  io .open (os .path .join (SYNC_DIR , source_file ), encoding = encoding ) as  f :
6165            truth  =  f .read ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments