Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
Run the pip_requirements test in a venv for now because of pypa/pip#3384
Browse files Browse the repository at this point in the history
.
  • Loading branch information
coderanger committed Jan 20, 2016
1 parent 606349e commit ab50b4a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/poise_python/resources/python_runtime_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,22 @@ def action_run
test_import('pytest', 'pytest_venv', python: nil, virtualenv: ::File.join(new_resource.path, 'venv'))

# Create and install a requirements file.
# Running this in a venv because of pip 8.0 and Ubuntu packaing
# both requests and six.
python_virtualenv ::File.join(new_resource.path, 'venv2') do
python new_resource.name
end
file ::File.join(new_resource.path, 'requirements.txt') do
content <<-EOH
requests==2.7.0
six==1.8.0
EOH
end
pip_requirements ::File.join(new_resource.path, 'requirements.txt') do
python new_resource.name
virtualenv ::File.join(new_resource.path, 'venv2')
end
test_import('requests')
test_import('six')
test_import('requests', python: nil, virtualenv: ::File.join(new_resource.path, 'venv2'))
test_import('six', python: nil, virtualenv: ::File.join(new_resource.path, 'venv2'))

# Create a non-root user and test installing with it.
test_user = "py#{new_resource.name}"
Expand Down

0 comments on commit ab50b4a

Please sign in to comment.