Skip to content

Commit

Permalink
Commented to see if other cases are fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
randhircs committed Feb 24, 2025
1 parent 4ce9389 commit ac29fea
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions python/spec/dependabot/python/file_parser/setup_file_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,19 @@
its(:length) { is_expected.to eq(12) }
end

# context "with an illformed_requirement" do
# let(:setup_file_fixture_name) { "illformed_req.py" }

# it "raises a helpful error" do
# expect { parser.dependency_set }
# .to raise_error do |error|
# expect(error.class)
# .to eq(Dependabot::DependencyFileNotEvaluatable)
# expect(error.message)
# .to eq('Illformed requirement ["="]')
# end
# end
# end
context "with an illformed_requirement" do
let(:setup_file_fixture_name) { "illformed_req.py" }

it "raises a helpful error" do
expect { parser.dependency_set }
.to raise_error do |error|
expect(error.class)
.to eq(Dependabot::DependencyFileNotEvaluatable)
expect(error.message)
.to eq('Illformed requirement ["==2.6.1raven==5.32.0"]')
end
end
end

context "with an `open` statement" do
let(:setup_file_fixture_name) { "with_open.py" }
Expand Down Expand Up @@ -255,19 +255,19 @@
its(:length) { is_expected.to eq(12) }
end

context "with an illformed_requirement" do
let(:setup_cfg_file_fixture_name) { "illformed_req.cfg" }

it "raises a helpful error" do
expect { parser.dependency_set }
.to raise_error do |error|
expect(error.class)
.to eq(Dependabot::DependencyFileNotEvaluatable)
expect(error.message)
.to include("InstallationError(\"Invalid requirement: 'psycopg2==2.6.1raven == 5.32.0'\")")
end
end
end
# context "with an illformed_requirement" do
# let(:setup_cfg_file_fixture_name) { "illformed_req.cfg" }

# it "raises a helpful error" do
# expect { parser.dependency_set }
# .to raise_error do |error|
# expect(error.class)
# .to eq(Dependabot::DependencyFileNotEvaluatable)
# expect(error.message)
# .to include("InstallationError(\"Invalid requirement: 'psycopg2==2.6.1raven == 5.32.0'\")")
# end
# end
# end

context "with comments in the setup.cfg file" do
subject(:dependency) { dependencies.find { |d| d.name == "boto3" } }
Expand Down

0 comments on commit ac29fea

Please sign in to comment.