Skip to content

disable test_robotparser test that uses an invalid URL #64952

Closed

Description

@larryhastings
BPO 20753
Nosy @orsenthil, @larryhastings, @bitdancer, @vajrasky
Files
  • test_robotparser_use_local_server.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/orsenthil'
    closed_at = <Date 2014-06-25.10:00:15.762>
    created_at = <Date 2014-02-23.23:25:13.231>
    labels = ['type-bug']
    title = 'disable test_robotparser test that uses an invalid URL'
    updated_at = <Date 2014-06-29.12:56:21.393>
    user = 'https://github.com/larryhastings'

    bugs.python.org fields:

    activity = <Date 2014-06-29.12:56:21.393>
    actor = 'python-dev'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2014-06-25.10:00:15.762>
    closer = 'orsenthil'
    components = []
    creation = <Date 2014-02-23.23:25:13.231>
    creator = 'larry'
    dependencies = []
    files = ['34214']
    hgrepos = []
    issue_num = 20753
    keywords = ['patch']
    message_count = 6.0
    messages = ['212044', '212047', '212082', '221538', '221539', '221838']
    nosy_count = 5.0
    nosy_names = ['orsenthil', 'larry', 'r.david.murray', 'python-dev', 'vajrasky']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20753'
    versions = ['Python 3.4', 'Python 3.5']

    Activity

    1. larryhastings commented on Feb 23, 2014

      @larryhastings
      ContributorAuthor

      Lib/tests/test_robotparser.py uses the following url:
      http://mueblesmoraleda.com/robots.txt

      That file now serves a 404.

      This should be disabled for 3.4, and the test rewritten for 3.5. If we get a patch quickly I would probably cherry-pick it for 3.4 final.

      Aside: it is REALLY IRRITATING that we have tests in the standard library that hit external web sites. The standard library regression test suite should *not* rely on network access. Can the rewritten test please spin up a local web server (http.server) and serve a robotx.txt that way?

    2. changed the title [-]disable test_robotparser[/-] [+]disable test_robotparser test that uses an invalid URL[/+] on Feb 23, 2014
    3. bitdancer commented on Feb 24, 2014

      @bitdancer
      Member

      There are tests where we have good reasons why we hit external servers, and this is why the 'network' resource is not on by default.

      That said, this doesn't appear to be a test that has a good reason to hit an external resource, since it should certainly be possible to serve a password protected 'site' locally.

    4. vajrasky commented on Feb 24, 2014

      vajraskymannequin
      Mannequin

      Okay, here is my attempt to rewrite the test using local web server. I copied and modified the code from Lib/test/test_socketserver.py. The website mueblesmoraleda can not be accessed so I could only guess what the intention of this test was.

      I am not sure whether I should remove the duplicate comment and using daemon or not.

    5. python-dev commented on Jun 25, 2014

      python-devmannequin
      Mannequin

      New changeset 16d8240ff841 by Senthil Kumaran in branch '3.4':
      bpo-20753 - robotparser tests should not rely upon external resource when not required.
      http://hg.python.org/cpython/rev/16d8240ff841

      New changeset 74cd8abcc302 by Senthil Kumaran in branch 'default':
      merge from 3.4
      http://hg.python.org/cpython/rev/74cd8abcc302

    6. orsenthil commented on Jun 25, 2014

      @orsenthil
      Member

      The patch was good and captured what was required. I made some minor modifications and committed it in 3.4 and 3.5

      Thanks for the patch, Vajrasky Kok.

    7. self-assigned this
      on Jun 25, 2014
    8. python-dev commented on Jun 29, 2014

      python-devmannequin
      Mannequin

      New changeset 0e08ca451b34 by Berker Peksag in branch '3.4':
      Issue bpo-20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.
      http://hg.python.org/cpython/rev/0e08ca451b34

      New changeset 394e6bda5a70 by Berker Peksag in branch 'default':
      Issue bpo-20753: Merge with 3.4.
      http://hg.python.org/cpython/rev/394e6bda5a70

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions