Skip to content

doctest _load_testfile function -- newline handling seems incorrect #46137

@pdonis

Description

@pdonis
mannequin
BPO 1812
Nosy @abalkin, @pdonis, @merwok, @zware, @miss-islington
PRs
  • bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method. #17385
  • [3.8] bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385) #19175
  • [3.7] bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385) #19176
  • bpo-43049: Use io.IncrementalNewlineDecoder for doctest newline conversion #24359
  • Files
  • doctest-fixes.diff: Diff against revision 59907 showing suggested fix
  • doctest-fixes1.diff: Revised diff against revision 59932
  • doctest-fixes2.diff: Revised diff against revision 82970
  • doctest-fixes3.diff: Revised diff against revision 82970, fixes patch apply issue
  • doctest-fixes-py3k.diff: Diff against py3k branch, revision 82984
  • doctest_testfile.txt: Raw doctest_testfile.txt for python 2.7 trunk
  • doctest_testfile.txt.py3k: Raw doctest_testfile.txt for py3k branch
  • doctest-fixes4.diff: Diff against trunk with improved test method
  • doctest-fixes5.diff: Diff against trunk rev 83044 with improved test method, py3k comments removed
  • doctest-fixes5-py3k.diff: Diff against py3k branch rev 83044 with improved test method
  • doctest-fixes6.diff: Diff against release27-maint branch rev 83060 with further improvments
  • doctest-fixes6-py3k.diff: Diff against py3k branch rev 83060 with further improvements
  • doctest-fixes7-py3k.diff: Updated patch against Mercurial default branch
  • doctest-fixes8-py3k.diff: Updated patch to ensure tests pass with -v flag
  • 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 = None
    closed_at = <Date 2020-03-26.16:26:07.378>
    created_at = <Date 2008-01-12.05:57:33.772>
    labels = ['easy', 'type-bug', '3.8', '3.9', '3.7', 'tests']
    title = 'doctest _load_testfile function -- newline handling seems incorrect'
    updated_at = <Date 2021-03-02.17:06:28.028>
    user = 'https://github.com/pdonis'

    bugs.python.org fields:

    activity = <Date 2021-03-02.17:06:28.028>
    actor = 'zach.ware'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-26.16:26:07.378>
    closer = 'zach.ware'
    components = ['Tests']
    creation = <Date 2008-01-12.05:57:33.772>
    creator = 'pdonis'
    dependencies = []
    files = ['9138', '9142', '18063', '18066', '18070', '18071', '18072', '18117', '18118', '18119', '18133', '18134', '26505', '26508']
    hgrepos = []
    issue_num = 1812
    keywords = ['patch', 'easy']
    message_count = 38.0
    messages = ['59801', '59802', '59834', '110706', '110755', '110767', '110779', '110795', '110808', '110813', '110815', '110822', '110824', '110825', '111143', '111144', '111148', '111180', '111215', '111218', '111299', '111304', '111314', '111351', '111361', '111392', '112980', '166348', '166352', '357468', '360436', '361926', '361927', '365086', '365090', '365091', '365092', '387940']
    nosy_count = 5.0
    nosy_names = ['belopolsky', 'pdonis', 'eric.araujo', 'zach.ware', 'miss-islington']
    pr_nums = ['17385', '19175', '19176', '24359']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1812'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifeeasytestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions