@@ -68,10 +68,10 @@ def get_tox_ini(
68
68
force_cpu = None ,
69
69
deps = None ,
70
70
skip_install = False ,
71
+ usedevelop = False ,
71
72
extra = False ,
72
73
pep517 = True ,
73
74
):
74
-
75
75
lines = ["[tox]" , "envlist = py" ]
76
76
77
77
if pep517 :
@@ -83,6 +83,8 @@ def get_tox_ini(
83
83
lines .append (f"basepython = { basepython } " )
84
84
if skip_install :
85
85
lines .append ("skip_install = True" )
86
+ if usedevelop :
87
+ lines .append ("usedevelop = True" )
86
88
if extra :
87
89
lines .append ("extras = extra" )
88
90
if disable_light_the_torch is not None :
@@ -108,6 +110,7 @@ def tox_ltt_initproj_(
108
110
force_cpu = None ,
109
111
deps = None ,
110
112
skip_install = False ,
113
+ usedevelop = False ,
111
114
pep517 = True ,
112
115
):
113
116
filedefs = {
@@ -120,6 +123,7 @@ def tox_ltt_initproj_(
120
123
"tox.ini" : get_tox_ini (
121
124
basepython = basepython ,
122
125
skip_install = skip_install ,
126
+ usedevelop = usedevelop ,
123
127
extra = extra_requires is not None ,
124
128
disable_light_the_torch = disable_light_the_torch ,
125
129
force_cpu = force_cpu ,
@@ -274,6 +278,22 @@ def test_tox_ltt_project_extra_pytorch_dists(
274
278
assert set (args [0 ]) == dists
275
279
276
280
281
+ def test_tox_ltt_project_usedevelop (
282
+ patch_find_links , tox_ltt_initproj , cmd , install_mock
283
+ ):
284
+ mock = patch_find_links ()
285
+ install_requires = ("torch>=1.5.0" , "torchvision>=0.6.0" )
286
+ dists = set (install_requires )
287
+ tox_ltt_initproj (install_requires = install_requires , usedevelop = True , pep517 = False )
288
+
289
+ result = cmd ()
290
+
291
+ result .assert_success (is_run_test_env = False )
292
+
293
+ args , _ = mock .call_args
294
+ assert set (args [0 ]) == dists
295
+
296
+
277
297
@pytest .fixture
278
298
def other_basepythons (current_tox_py ):
279
299
current_minor = int (current_tox_py [- 1 ])
0 commit comments