diff --git a/python/spec/dependabot/python/update_checker/requirements_updater_spec.rb b/python/spec/dependabot/python/update_checker/requirements_updater_spec.rb index 8ec33b2f64b..f5d2e985818 100644 --- a/python/spec/dependabot/python/update_checker/requirements_updater_spec.rb +++ b/python/spec/dependabot/python/update_checker/requirements_updater_spec.rb @@ -121,6 +121,24 @@ end end + context "when a > req was specified" do + let(:requirement_txt_req_string) { "> 1.3.0" } + + it { is_expected.to eq(requirement_txt_req) } + + context "when dealing with exactly the version being updated to" do + let(:requirement_txt_req_string) { "> 1.5.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + + context "when dealing with the version lower than the lower bound" do + let(:requirement_txt_req_string) { "> 1.4.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + end + context "when a range requirement was specified" do let(:requirement_txt_req_string) { ">=1.3.0" } @@ -496,6 +514,36 @@ it { is_expected.to eq(pyproject_req) } end + context "when a != req was specified" do + let(:pyproject_req_string) { "!= 1.3.0" } + + it { is_expected.to eq(pyproject_req) } + + context "when dealing with exactly the version being updated to" do + let(:pyproject_req_string) { "!=1.5.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + end + + context "when a > req was specified" do + let(:pyproject_req_string) { "> 1.3.0" } + + it { is_expected.to eq(pyproject_req) } + + context "when dealing with exactly the version being updated to" do + let(:pyproject_req_string) { "> 1.5.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + + context "when dealing with the version lower than the lower bound" do + let(:pyproject_req_string) { "> 1.4.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + end + context "when a range requirement was specified" do let(:pyproject_req_string) { ">=1.3.0" } @@ -636,6 +684,36 @@ it { is_expected.to eq(pyproject_req) } end + context "when a != req was specified" do + let(:pyproject_req_string) { "!= 1.3.0" } + + it { is_expected.to eq(pyproject_req) } + + context "when dealing with exactly the version being updated to" do + let(:pyproject_req_string) { "!=1.5.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + end + + context "when a > req was specified" do + let(:pyproject_req_string) { "> 1.3.0" } + + it { is_expected.to eq(pyproject_req) } + + context "when dealing with exactly the version being updated to" do + let(:pyproject_req_string) { "> 1.5.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + + context "when dealing with the version lower than the lower bound" do + let(:pyproject_req_string) { "> 1.4.0" } + + its([:requirement]) { is_expected.to eq(:unfixable) } + end + end + context "when a range requirement was specified" do let(:pyproject_req_string) { ">=1.3.0" }