Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging test_pep263.py and test_coding.py #62248

Closed
serhiy-storchaka opened this issue May 24, 2013 · 8 comments
Closed

Merging test_pep263.py and test_coding.py #62248

serhiy-storchaka opened this issue May 24, 2013 · 8 comments
Labels
easy tests Tests in the Lib/test dir topic-unicode type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 18048
Nosy @malemburg, @loewis, @ezio-melotti, @serhiy-storchaka
Files
  • fix_issue_18048.patch: Fixes issue 18048, I think
  • 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 2013-06-13.07:16:01.992>
    created_at = <Date 2013-05-24.09:30:12.880>
    labels = ['easy', 'type-feature', 'tests', 'expert-unicode']
    title = 'Merging test_pep263.py and test_coding.py'
    updated_at = <Date 2016-03-20.19:39:03.373>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2016-03-20.19:39:03.373>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-06-13.07:16:01.992>
    closer = 'serhiy.storchaka'
    components = ['Tests', 'Unicode']
    creation = <Date 2013-05-24.09:30:12.880>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['30539']
    hgrepos = []
    issue_num = 18048
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['189902', '189908', '190827', '190943', '191063', '191064', '262086', '262087']
    nosy_count = 7.0
    nosy_names = ['lemburg', 'loewis', 'nnorwitz', 'ezio.melotti', 'python-dev', 'serhiy.storchaka', 'Matthew.Bentley']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18048'
    versions = ['Python 3.4']

    @serhiy-storchaka
    Copy link
    Member Author

    There are two test files for the same feature -- defining Python source code encodings (PEP-263). It is not clear where new tests should be added. Perhaps two files should be merged into the one file.

    test_pep263.py was added in 2002, test_coding.py was added in 2005.

    @serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir topic-unicode type-feature A feature request or enhancement labels May 24, 2013
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 24, 2013

    For a bug fix release, I consider refactoring of test cases inappropriate.

    If they really ought to be merged, I consider neither file name particularly descriptive, so perhaps a new file name should be used altogether (e.g. test_source_encoding).

    @ezio-melotti
    Copy link
    Member

    e.g. test_source_encoding

    This SGTM. I particularly dislike test_pep*, especially when I can't remember the pep number.

    @MatthewBentley
    Copy link
    Mannequin

    MatthewBentley mannequin commented Jun 11, 2013

    OK, I think I fixed this. I merged the two tests into one, called test_source_encoding.py. It doesn't fail, and I'm not sure what else I need to do.

    Patch is attached.

    This is also my first patch, so please tell me if I'm doing anything wrong.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 13, 2013

    New changeset 00a199c265c3 by Serhiy Storchaka in branch 'default':
    Issue bpo-18048: Rename test_pep263.py to test_source_encoding.py.
    http://hg.python.org/cpython/rev/00a199c265c3

    New changeset 3b906421245d by Serhiy Storchaka in branch 'default':
    Issue bpo-18048: Rename test_coding.py to test_source_encoding.py.
    http://hg.python.org/cpython/rev/3b906421245d

    New changeset 464e8fd7300d by Serhiy Storchaka in branch 'default':
    Issue bpo-18048: Merge test_pep263.py and test_coding.py into test_source_encoding.py.
    http://hg.python.org/cpython/rev/464e8fd7300d

    @serhiy-storchaka
    Copy link
    Member Author

    Merging itself is trivial. The trick is how preserve the history of both files. Unfortunately this can't be represented in one mercurial patch. Three commits needed for this.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 20, 2016

    New changeset 776e9b8bdd96 by Serhiy Storchaka in branch '2.7':
    Issue bpo-18048: Rename test_pep263.py to test_source_encoding.py.
    https://hg.python.org/cpython/rev/776e9b8bdd96

    New changeset deadfb03dec0 by Serhiy Storchaka in branch '2.7':
    Issue bpo-18048: Rename test_coding.py to test_source_encoding.py.
    https://hg.python.org/cpython/rev/deadfb03dec0

    New changeset c42d743779bd by Serhiy Storchaka in branch '2.7':
    Issue bpo-18048: Merge test_pep263.py and test_coding.py into test_source_encoding.py.
    https://hg.python.org/cpython/rev/c42d743779bd

    @serhiy-storchaka
    Copy link
    Member Author

    Backported to 2.7 for the sake of easier backporting new tests.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy tests Tests in the Lib/test dir topic-unicode type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants