Skip to content

Commit e78bd50

Browse files
committed
Make virtualenv tests consistent and always use Python 3
1 parent 99fbdaf commit e78bd50

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

spec/acceptance/virtualenv_spec.rb

+20
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ class { 'python' :
3232

3333
it 'maintains pip version' do
3434
pp = <<-EOS
35+
$version = '3'
36+
3537
class { 'python' :
38+
version => $version,
3639
pip => 'present',
3740
virtualenv => 'present',
3841
}
3942
-> python::virtualenv { 'venv' :
4043
ensure => 'present',
44+
version => $version,
4145
systempkgs => false,
4246
venv_dir => '/opt/venv2',
4347
}
@@ -54,12 +58,16 @@ class { 'python' :
5458

5559
it 'works with ensure=>latest' do
5660
pp = <<-EOS
61+
$version = '3'
62+
5763
class { 'python' :
64+
version => $version,
5865
pip => 'present',
5966
virtualenv => 'present',
6067
}
6168
-> python::virtualenv { 'venv' :
6269
ensure => 'present',
70+
version => $version,
6371
systempkgs => false,
6472
venv_dir => '/opt/venv3',
6573
}
@@ -78,12 +86,16 @@ class { 'python' :
7886

7987
it 'works with ensure=>latest for package with underscore in its name' do
8088
pp = <<-EOS
89+
$version = '3'
90+
8191
class { 'python' :
92+
version => $version,
8293
pip => 'present',
8394
virtualenv => 'present',
8495
}
8596
-> python::virtualenv { 'venv' :
8697
ensure => 'present',
98+
version => $version,
8799
systempkgs => false,
88100
venv_dir => '/opt/venv4',
89101
}
@@ -102,15 +114,19 @@ class { 'python' :
102114

103115
it 'works with editable=>true' do
104116
pp = <<-EOS
117+
$version = '3'
118+
105119
package{ 'git' :
106120
ensure => 'present',
107121
}
108122
-> class { 'python' :
123+
version => $version,
109124
pip => 'present',
110125
virtualenv => 'present',
111126
}
112127
-> python::virtualenv { 'venv' :
113128
ensure => 'present',
129+
version => $version,
114130
systempkgs => false,
115131
venv_dir => '/opt/venv5',
116132
}
@@ -129,12 +145,16 @@ class { 'python' :
129145

130146
it 'works with == in pkgname' do
131147
pp = <<-EOS
148+
$version = '3'
149+
132150
class { 'python' :
151+
version => $version,
133152
pip => 'present',
134153
virtualenv => 'present',
135154
}
136155
-> python::virtualenv { 'venv' :
137156
ensure => 'present',
157+
version => $version,
138158
systempkgs => false,
139159
venv_dir => '/opt/venv6',
140160
}

0 commit comments

Comments
 (0)