This repository was archived by the owner on Jun 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 77class python::install {
88
99 $python = $python::version ? {
10- ' system' => ' python' ,
11- ' pypy' => ' pypy' ,
12- /\A(python)?([0-9]+)/ => " python${2}" ,
13- /\Arh-python[0-9]{2 }/ => $python::version ,
14- default => " python${python::version} " ,
10+ ' system' => ' python' ,
11+ ' pypy' => ' pypy' ,
12+ /\A(python[23]\.[0-9]+)/ => $1,
13+ /\A(python)?([0-9]+)/ => " python${2}" ,
14+ /\Arh-python[0-9]{2 }/ => $python::version ,
15+ default => " python${python::version} " ,
1516 }
1617
1718 $pythondev = $facts [' os' ][' family' ] ? {
Original file line number Diff line number Diff line change 2121 # Basic python packages (from pip)
2222 it { is_expected . to contain_package ( 'virtualenv' ) }
2323
24+ describe 'with python::version' do
25+ context 'python3.7' do
26+ let ( :params ) { { version : 'python3.7' } }
27+
28+ it { is_expected . to compile . with_all_deps }
29+ it { is_expected . to contain_package ( 'pip' ) . with_name ( 'python3.7-pip' ) }
30+ it { is_expected . to contain_package ( 'python' ) . with_name ( 'python3.7' ) }
31+ it { is_expected . to contain_package ( 'python-dev' ) . with_name ( 'python3.7-dev' ) }
32+ it { is_expected . to contain_package ( 'virtualenv' ) . with_name ( 'virtualenv' ) }
33+ end
34+ end
35+
2436 describe 'with python::dev' do
2537 context 'true' do
2638 let ( :params ) { { dev : 'present' } }
You can’t perform that action at this time.
0 commit comments