8000
  • [3.13] gh-71339: Add additional assertion methods in test.support (GH-128707) by serhiy-storchaka · Pull Request #128815 · python/cpython · GitHub
    [go: up one dir, main page]

    Skip to content

    [3.13] gh-71339: Add additional assertion methods in test.support (GH-128707)#128815

    Merged
    serhiy-storchaka merged 1 commit intopython:3.13from
    serhiy-storchaka:extra-assertions-3.13
    Jan 20, 2025
    Merged

    [3.13] gh-71339: Add additional assertion methods in test.support (GH-128707)#128815
    serhiy-storchaka merged 1 commit intopython:3.13from
    serhiy-storchaka:extra-assertions-3.13

    Conversation

    @serhiy-storchaka
    Copy link
    Member
    @serhiy-storchaka serhiy-storchaka commented Jan 14, 2025

    Add a mix-in class ExtraAssertions containing the following methods:

    • assertHasAttr() and assertNotHasAttr()
    • assertIsSubclass() and assertNotIsSubclass()
    • assertStartsWith() and assertNotStartsWith()
    • assertEndsWith() and assertNotEndsWith()

    (cherry picked from commit 06cad77)

    This will help to backport new tests that use new assertion methods.

    @serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.12 only security fixes labels Jan 14, 2025
    @serhiy-storchaka serhiy-storchaka changed the title gh-71339: Add additional assertion methods in test.support (GH-128707) [3.13] gh-71339: Add additional assertion methods in test.support (GH-128707) Jan 14, 2025
    …honGH-128707)
    
    Add a mix-in class ExtraAssertions containing the following methods:
    
    * assertHasAttr() and assertNotHasAttr()
    * assertIsSubclass() and assertNotIsSubclass()
    * assertStartsWith() and assertNotStartsWith()
    * assertEndsWith() and assertNotEndsWith()
    
    (cherry picked from commit 06cad77)
    @serhiy-storchaka serhiy-storchaka merged commit c6a566e into python:3.13 Jan 20, 2025
    31 checks passed
    @miss-islington-app
    Copy link

    Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
    🐍🍒⛏🤖

    @serhiy-storchaka serhiy-storchaka deleted the extra-assertions-3.13 branch January 20, 2025 09:19
    @miss-islington-app
    Copy link

    Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
    Please backport using cherry_picker on command line.

    cherry_picker c6a566e47b9903d48e6e1e78a1af20e6c6c535cf 3.12
    

    serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jan 20, 2025
    …t.support (pythonGH-128707) (pythonGH-128815)
    
    Add a mix-in class ExtraAssertions containing the following methods:
    
    * assertHasAttr() and assertNotHasAttr()
    * assertIsSubclass() and assertNotIsSubclass()
    * assertStartsWith() and assertNotStartsWith()
    * assertEndsWith() and assertNotEndsWith()
    
    (cherry picked from commit c6a566e)
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    (cherry picked from commit 06cad77)
    @bedevere-app
    Copy link
    bedevere-app bot commented Jan 20, 2025

    GH-129059 is a backport of this pull request to the 3.12 branch.

    @bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 20, 2025
    serhiy-storchaka added a commit that referenced this pull request Jan 20, 2025
    …-128707) (GH-128815) (GH-129059)
    
    Add a mix-in class ExtraAssertions containing the following methods:
    
    * assertHasAttr() and assertNotHasAttr()
    * assertIsSubclass() and assertNotIsSubclass()
    * assertStartsWith() and assertNotStartsWith()
    * assertEndsWith() and assertNotEndsWith()
    
    (cherry picked from commit c6a566e)
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    (cherry picked from commit 06cad77)


    class FunctionalAPIBase(util.DiskSetup):
    class FunctionalAPIBase(util.DiskSetup, ExtraAssertions):
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    The change in this file is going to be overwritten unless ported over to importlib_resources (and backported to support Python 3.9).

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    skip news tests Tests in the Lib/test dir

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants

    0