2020INSTALL_CHECKS_FILENAME = 'install_checks.py'
2121
2222
23- @pytest .fixture (name = "package_type" , params = ["install" , "develop" , "sdist" , "bdist_wheel" ])
23+ @pytest .fixture (name = "package_type" , params = ["install" , "develop" , "sdist" , "bdist_wheel" , "pypi" ])
2424def package_type_ (request ):
2525 return request .param
2626
@@ -41,15 +41,21 @@ def test_install(install_type, tmp_path, package_type):
4141
4242 shutil .copy (TEST_ROOT / INSTALL_CHECKS_FILENAME , run_path )
4343
44- subprocess .run (
45- "{python} {nncf_repo_root}/setup.py {package_type} {install_flag}" .format (python = python_executable_with_venv ,
46- nncf_repo_root = PROJECT_ROOT ,
47- package_type = package_type ,
48- install_flag = '--cpu-only' if
49- install_type == "CPU" else '' ),
50- check = True ,
51- shell = True ,
52- cwd = PROJECT_ROOT )
44+ if package_type == "pypi" :
45+ subprocess .run (
46+ "{} install nncf" .format (pip_with_venv ), check = True , shell = True )
47+ else :
48+
49+ subprocess .run (
50+ "{python} {nncf_repo_root}/setup.py {package_type} {install_flag}" .format (
51+ python = python_executable_with_venv ,
52+ nncf_repo_root = PROJECT_ROOT ,
53+ package_type = package_type ,
54+ install_flag = '--cpu-only' if
55+ install_type == "CPU" else '' ),
56+ check = True ,
57+ shell = True ,
58+ cwd = PROJECT_ROOT )
5359
5460 # Do additional install step for sdist/bdist packages
5561 if package_type == "sdist" :
0 commit comments