summaryrefslogtreecommitdiff
path: root/spec/integration/python/pip_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/python/pip_spec.rb')
-rw-r--r--spec/integration/python/pip_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/integration/python/pip_spec.rb b/spec/integration/python/pip_spec.rb
index a52b992..9c2721d 100644
--- a/spec/integration/python/pip_spec.rb
+++ b/spec/integration/python/pip_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
RSpec.describe "pip" do
@@ -100,10 +102,20 @@ RSpec.describe "pip" do
context "when a project uses a custom `SETUP_CMD`" do
before do
runner.add_file('requirements.txt', 'six==1.14.0')
+ runner.add_file('.python-version', '3.8.4')
+ runner.add_file('custom.sh') do
+ <<~SCRIPT
+ #!/bin/bash -lx
+
+ asdf install python 3.8.4
+ asdf reshim
+ pip install -r requirements.txt
+ SCRIPT
+ end
end
it 'detects the software licenses' do
- report = runner.scan(env: { 'SETUP_CMD' => 'pip install -r requirements.txt' })
+ report = runner.scan(env: { 'SETUP_CMD' => 'bash custom.sh' })
expect(report).to match_schema(version: '2.0')
expect(report.licenses_for('six')).to match_array(["MIT"])