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

Added test coverage for calendar print functions #63056

Closed
MadisonMay mannequin opened this issue Aug 27, 2013 · 5 comments
Closed

Added test coverage for calendar print functions #63056

MadisonMay mannequin opened this issue Aug 27, 2013 · 5 comments
Assignees
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@MadisonMay
Copy link
Mannequin

MadisonMay mannequin commented Aug 27, 2013

BPO 18856
Nosy @ezio-melotti
Files
  • calendar_print.diff
  • calendar_print_v2.diff: Updated to use test.support.captured_stdout()
  • 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/ezio-melotti'
    closed_at = <Date 2013-09-15.01:08:13.521>
    created_at = <Date 2013-08-27.19:19:21.740>
    labels = ['type-feature', 'tests']
    title = 'Added test coverage for calendar print functions'
    updated_at = <Date 2013-09-15.01:08:13.519>
    user = 'https://bugs.python.org/madisonmay'

    bugs.python.org fields:

    activity = <Date 2013-09-15.01:08:13.519>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-09-15.01:08:13.521>
    closer = 'ezio.melotti'
    components = ['Tests']
    creation = <Date 2013-08-27.19:19:21.740>
    creator = 'madison.may'
    dependencies = []
    files = ['31487', '31611']
    hgrepos = []
    issue_num = 18856
    keywords = ['patch']
    message_count = 5.0
    messages = ['196311', '196312', '196994', '197739', '197740']
    nosy_count = 3.0
    nosy_names = ['ezio.melotti', 'python-dev', 'madison.may']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18856'
    versions = ['Python 3.3', 'Python 3.4']

    @MadisonMay
    Copy link
    Mannequin Author

    MadisonMay mannequin commented Aug 27, 2013

    Just redirected stdout to a string io object unittest.mock.patch() to add basic test coverage for calendar.py print functions (TextCalendary.prweek(), TextCalendar.prmonth(), TextCalendar.pryear(), and format()).

    @MadisonMay MadisonMay mannequin added tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Aug 27, 2013
    @MadisonMay
    Copy link
    Mannequin Author

    MadisonMay mannequin commented Aug 27, 2013

    "...to a string io object USING unittest.mock.patch()..."

    @MadisonMay
    Copy link
    Mannequin Author

    MadisonMay mannequin commented Sep 5, 2013

    At Ezio suggestion, I've updated the patch to use test.support.captured_stdout().

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 15, 2013

    New changeset 442e23bbec48 by Ezio Melotti in branch '3.3':
    bpo-18856: improve test coverage of the calendar module. Patch by Madison May.
    http://hg.python.org/cpython/rev/442e23bbec48

    New changeset 81da2ed0c563 by Ezio Melotti in branch 'default':
    bpo-18856: merge with 3.3.
    http://hg.python.org/cpython/rev/81da2ed0c563

    @ezio-melotti
    Copy link
    Member

    Fixed, thanks for the patch!

    @ezio-melotti ezio-melotti self-assigned this Sep 15, 2013
    @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
    tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant