Project

General

Profile

Development #85511

test: Compatibilité Python 3.11

Added by Yann Weber 3 months ago. Updated 3 months ago.

Status:
Fermé
Priority:
Normal
Assignee:
Target version:
-
Start date:
10 January 2024
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Une modification des mock de unittest empêche deux tests de passer :

FAILED tests/test_lingo_payment.py::TestPolling::TestPollBackendCommand::test_cli_ok - ValueError: invalid format: 'combo.apps.lingo.management.commands.lingo-poll-backend'
FAILED tests/test_lingo_payment.py::TestPolling::TestPollBackendCommand::test_cli_errors - ValueError: invalid format: 'combo.apps.lingo.management.commands.lingo-poll-backend'

Les lignes menant à l'exception dans les tests :
>       with mock.patch('combo.apps.lingo.management.commands.lingo-poll-backend.input') as mock_input:

tests/test_lingo_payment.py:2231:

        with mock.patch('combo.apps.lingo.models.PaymentBackend.poll_backend') as mock_poll_backend:
>           with mock.patch(
                'combo.apps.lingo.management.commands.lingo-poll-backend.input'
            ) as mock_input:

tests/test_lingo_payment.py:2221:

Les noms de modules utilisés sont considérés (à juste titre) comme invalides (contenant des '-') après une modification dans unittest :
https://github.com/python/cpython/commit/ab7fcc8fbdc11091370deeb000a787fb02f9b13d

Associated revisions

Revision 43a6bb14 (diff)
Added by Yann Weber 3 months ago

commands: rename lingo-poll-backend to lingo_poll_backend (#85511)

History

#1

Updated by Robot Gitea 3 months ago

  • Status changed from Nouveau to En cours
  • Assignee set to Yann Weber

Yann Weber (yweber) a ouvert une pull request sur Gitea concernant cette demande :

#2

Updated by Robot Gitea 3 months ago

  • Status changed from En cours to Solution proposée
#3

Updated by Robot Gitea 3 months ago

  • Status changed from Solution proposée to Solution validée

Benjamin Dauvergne (bdauvergne) a approuvé une pull request sur Gitea concernant cette demande :

#4

Updated by Robot Gitea 3 months ago

  • Status changed from Solution validée to Résolu (à déployer)

Yann Weber (yweber) a mergé une pull request sur Gitea concernant cette demande :

#5

Updated by Transition automatique 3 months ago

  • Status changed from Résolu (à déployer) to Solution déployée
#7

Updated by Transition automatique about 1 month ago

Automatic expiration

Also available in: Atom PDF