unittest.mock does not wrap dunder methods (__getitem__ etc)

Aberta
#69,783 12 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
testing-qa

Direção de pesquisa

Start with the unittest.mock behavior described in the issue and review test-mock-wraps-dict.py, the test file linked in the report. Check the existing pull requests #16029 and #19734 before proceeding. Done means dunder methods such as getitem are wrapped as expected and the relevant tests pass.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

3.9 (EOL) stdlib type-bug
BPO 25597
Nosy @rbtcollins, @cjw296, @bitdancer, @voidspace, @phmc, @lisroach, @tonybaloney, @mariocj89, @tirkarthi, @akulakov
PRs
  • python/cpython#16029
  • python/cpython#19734
  • Files
  • test-mock-wraps-dict.py
  • 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 = None
    created_at = <Date 2015-11-10.17:02:38.914>
    labels = ['type-bug', 'library', '3.9']
    title = 'unittest.mock does not wrap dunder methods (__getitem__ etc)'
    updated_at = <Date 2021-08-28.03:05:05.247>
    user = 'https://bugs.python.org/DarraghBailey'
    

    bugs.python.org fields:

    activity = <Date 2021-08-28.03:05:05.247>
    actor = 'andrei.avk'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2015-11-10.17:02:38.914>
    creator = 'Darragh Bailey'
    dependencies = []
    files = ['41001']
    hgrepos = []
    issue_num = 25597
    keywords = ['patch']
    message_count = 12.0
    messages = ['254453', '254466', '261835', '341615', '351469', '351824', '352124', '352125', '360739', '367559', '367623', '400457']
    nosy_count = 11.0
    nosy_names = ['rbcollins', 'cjw296', 'r.david.murray', 'michael.foord', 'pconnell', 'Darragh Bailey', 'lisroach', 'anthonypjshaw', 'mariocj89', 'xtreak', 'andrei.avk']
    pr_nums = ['16029', '19734']
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25597'
    versions = ['Python 3.9']
    

    Linguagem predominante
    Python
    Estrelas
    77.2k
    Forks
    36k
    Merge médio
    1d 9h
    PRs com merge (30d)
    558

    Guia de contribuição

    Abrir o guia de contribuição

    Primeiros passos

    1. Leia a issue inteira e depois o guia de contribuição do projeto.
    2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
    3. Faça um fork do repositório e trabalhe em uma branch.
    4. Abra um pull request que referencie o número da issue.

    Mais de python/cpython

    Todas as issues de python/cpython

    Issues semelhantes

    Mais issues de Python

    Receba novas issues na sua caixa de entrada

    Um resumo curto de issues do GitHub para quem está começando.