@@ -40,28 +40,16 @@ def parse_tox():
40
40
env_matcher , dependency = line .split (":" , 1 )
41
41
dependencies .append ((env_matcher .strip (), dependency ))
42
42
43
- batch_jobs = {}
44
43
single_jobs = []
45
44
46
45
for env in expand_envlist (config ['tox' ]['envlist' ]):
47
46
python_version , integration , framework_version , * _ = (
48
47
list (env .split ("-" )) + [None , None ]
49
48
)
50
49
51
- python_version_jobs = batch_jobs .setdefault (python_version , [])
52
-
53
- if integration is None :
54
- python_version_jobs .append ({})
55
- else :
56
- for job in python_version_jobs :
57
- if job and job .setdefault (integration , framework_version ) == framework_version :
58
- break
59
- else :
60
- python_version_jobs .append ({integration : framework_version })
61
-
62
50
single_jobs .append ((python_version , integration , framework_version ))
63
51
64
- return dependencies , batch_jobs , single_jobs
52
+ return dependencies , single_jobs
65
53
66
54
67
55
def _format_job_name (python_version , integration , framework_version ):
@@ -72,30 +60,23 @@ def _format_job_name(python_version, integration, framework_version):
72
60
73
61
74
62
def generate_test_sessions ():
75
- dependencies , batch_jobs , single_jobs = parse_tox ()
63
+ dependencies , single_jobs = parse_tox ()
76
64
77
- def add_nox_job (job_name , integrations , python_version , deps ):
65
+ def add_nox_job (job_name , integration , python_version , deps ):
78
66
def func (session , fast = False ):
79
67
if not fast :
80
68
session .install ("-U" , "pip" )
81
69
session .install ("-e" , "." )
82
70
session .install ("-r" , "test-requirements.txt" )
83
71
84
72
if deps :
85
- session .install (
86
- * deps ,
87
- # Necessary to be able to specify double-requirements
88
- "--use-feature=2020-resolver" ,
89
- )
73
+ session .install (* deps )
90
74
91
75
session .env ['COVERAGE_FILE' ] = ".coverage-{job_name}" .format (job_name = job_name )
92
76
session .run (
93
77
"pytest" ,
94
- * [
95
- "tests/integrations/{integration}" .format (integration = integration )
96
- if integration else "tests/"
97
- for integration in integrations
98
- ],
78
+ "tests/integrations/{integration}" .format (integration = integration )
79
+ if integration else "tests/" ,
99
80
* session .posargs
100
81
)
101
82
@@ -110,20 +91,7 @@ def func(session, fast=False):
110
91
job_name = _format_job_name (python_version ,integration ,framework_version )
111
92
deps = list (find_dependencies (dependencies , job_name ))
112
93
113
- add_nox_job ("test-{job_name}" .format (job_name = job_name ), [integration ], python_version , deps )
114
-
115
- for python_version , batches in batch_jobs .items ():
116
- for batch_name , integrations in enumerate (batches ):
117
- job_name = "batchtest-{python_version}-{batch_name}" .format (python_version = python_version , batch_name = batch_name )
118
- deps = []
119
- for integration , framework_version in integrations .items ():
120
- deps .extend (find_dependencies (
121
- dependencies ,
122
- _format_job_name (python_version , integration , framework_version )
123
- ))
124
-
125
- add_nox_job (job_name , integrations , python_version , deps )
126
-
94
+ add_nox_job ("test-{job_name}" .format (job_name = job_name ), integration , python_version , deps )
127
95
128
96
@nox .session (python = "3.8" )
129
97
def linters (session ):
@@ -143,7 +111,7 @@ def travis_test(session):
143
111
installed_base_deps = False
144
112
for name , f in globals ().items ():
145
113
python = "pypy" if travis_python == "pypy" else "py{}" .format (travis_python )
146
- if name .startswith ("batchtest -{python}" .format (python = python )):
114
+ if name .startswith ("test -{python}" .format (python = python )):
147
115
f (session , fast = installed_base_deps )
148
116
installed_base_deps = True
149
117
0 commit comments