File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 4
4
import os
5
5
import shutil
6
6
import subprocess
7
+ import sys
7
8
8
9
import pytest
9
10
@@ -36,7 +37,8 @@ def test_rule_on_short_path():
36
37
37
38
@pytest .mark .parametrize ("source_file" , TEST_FILES )
38
39
def 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" )
40
42
rule = unasync .Rule (fromdir = ASYNC_DIR , todir = str (tmpdir ))
41
43
rule ._unasync_file (os .path .join (ASYNC_DIR , source_file ))
42
44
@@ -56,6 +58,8 @@ def test_unasync_files(tmpdir):
56
58
)
57
59
58
60
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
59
63
encoding = "latin-1" if "encoding" in source_file else "utf-8"
60
64
with io .open (os .path .join (SYNC_DIR , source_file ), encoding = encoding ) as f :
61
65
truth = f .read ()
You can’t perform that action at this time.
0 commit comments