-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
BugSomething isn't workingSomething isn't workingDownstream BenchmarkSomething related to an individual downstream benchmark, such as SWE or SWTSomething related to an individual downstream benchmark, such as SWE or SWT
Description
uid = repotest_pallets__flask-13
The current prepatch leaves the datapoint un-validatable.
That seems to be a minor mistake.
The error I see in coverage-post.txt is:
Couldn't parse '/testbed/tests/test_helpers.py' as Python source: 'expected an indented block after class definition on line 102' at line 110
My guess is the prepatch:
[[ Other Valid Patch Parts ]]
def test_context_available(app, client):
diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index ee77f176..2e39ba36 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -100,73 +100,11 @@ class TestSendfile:
class TestUrlFor:
- def test_url_for_with_anchor(self, app, req_ctx):
- @app.route("/")
- def index():
- return "42"
-
- assert flask.url_for("index", _anchor="x y") == "/#x%20y"
-
- def test_url_for_with_scheme(self, app, req_ctx):
- @app.route("/")
- def index():
- return "42"
-
- assert (
- flask.url_for("index", _external=True, _scheme="https")
- == "https://localhost/"
- )
-
- def test_url_for_with_scheme_not_external(self, app, req_ctx):
- app.add_url_rule("/", endpoint="index")
-
- # Implicit external with scheme.
- url = flask.url_for("index", _scheme="https")
- assert url == "https://localhost/"
-
- # Error when external=False with scheme
- with pytest.raises(ValueError):
- flask.url_for("index", _scheme="https", _external=False)
-
- def test_url_for_with_alternating_schemes(self, app, req_ctx):
- @app.route("/")
- def index():
- return "42"
-
- assert flask.url_for("index", _external=True) == "http://localhost/"
- assert (
- flask.url_for("index", _external=True, _scheme="https")
- == "https://localhost/"
- )
- assert flask.url_for("index", _external=True) == "http://localhost/"
-
- def test_url_with_method(self, app, req_ctx):
- from flask.views import MethodView
-
- class MyView(MethodView):
- def get(self, id=None):
- if id is None:
- return "List"
- return f"Get {id:d}"
- def post(self):
- return "Create"
- myview = MyView.as_view("myview")
- app.add_url_rule("/myview/", methods=["GET"], view_func=myview)
- app.add_url_rule("/myview/<int:id>", methods=["GET"], view_func=myview)
- app.add_url_rule("/myview/create", methods=["POST"], view_func=myview)
- assert flask.url_for("myview", _method="GET") == "/myview/"
- assert flask.url_for("myview", id=42, _method="GET") == "/myview/42"
- assert flask.url_for("myview", _method="POST") == "/myview/create"
- def test_url_for_with_self(self, app, req_ctx):
- @app.route("/<self>")
- def index(self):
- return "42"
- assert flask.url_for("index", self="2") == "/2"
def test_redirect_no_app():
[[ Other Valid Patch Parts ]]Produces a valid nesting because the class gets emptied.
We ran on all datapoints and this seems to be a really unique instance of this, I don't think there is a problem in processing.
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingDownstream BenchmarkSomething related to an individual downstream benchmark, such as SWE or SWTSomething related to an individual downstream benchmark, such as SWE or SWT