diff options
| author | Tetiana Chupryna <tchupryna@gitlab.com> | 2020-07-24 15:28:54 +0300 |
|---|---|---|
| committer | Tetiana Chupryna <tchupryna@gitlab.com> | 2020-08-21 13:09:09 +0300 |
| commit | 3c098f5a25e0e598cb134407f3bd62163d06abf3 (patch) | |
| tree | c82a9c83a9a05246ee18cb62e88445ac92064bc8 /spec/integration | |
| parent | 366fbf58b1334f771e76b313dac58f568a420e0e (diff) | |
Denormalize BSD-4-Clause license
Diffstat (limited to 'spec/integration')
| -rw-r--r-- | spec/integration/python/pip_spec.rb | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/spec/integration/python/pip_spec.rb b/spec/integration/python/pip_spec.rb index 9c2721d..84fbd89 100644 --- a/spec/integration/python/pip_spec.rb +++ b/spec/integration/python/pip_spec.rb @@ -46,6 +46,28 @@ RSpec.describe "pip" do end end + context 'with BSD licenses dependencies' do + let(:requirements) do + [ + 'webencodings', + 'idna', + 'click', + 'EasyProcess' + ].join("\n") + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + + expect(report.licenses_for('webencodings')).to eq(['BSD']) + expect(report.licenses_for('idna')).to eq(['BSD-like']) + expect(report.licenses_for('click')).to eq(['BSD-3-Clause']) + expect(report.licenses_for('EasyProcess')).to eq(['BSD']) + end + end + [{ version: '2', commit: '04dce91b' }, { version: '3', commit: '48e250a1' }].each do |python| ['1.0', '1.1', '2.0', '2.1'].each do |report_version| context "when generating a `#{report_version}` report using Python `#{python[:version]}`" do @@ -148,14 +170,14 @@ RSpec.describe "pip" do runner.add_file('setup.py') do <<~RAW -from setuptools import setup, find_packages - -setup( - name='gitlab-sp-test-python-pip', - version='1.2.0', - packages=find_packages(), - install_requires=['requests'], -) + from setuptools import setup, find_packages + + setup( + name='gitlab-sp-test-python-pip', + version='1.2.0', + packages=find_packages(), + install_requires=['requests'], + ) RAW end end @@ -178,9 +200,9 @@ setup( before do runner.add_file('custom.sh') do <<~SCRIPT - #!/bin/bash -l + #!/bin/bash -l - python --version &> '#{output_file}' + python --version &> '#{output_file}' SCRIPT end end |
