Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pygolang pygolang
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • pygolangpygolang
  • Merge requests
  • !29

Closed
Created Sep 22, 2024 by Kirill Smelkov@kirrOwner
  • Report abuse
Report abuse

golang: test: Fix for Pytest < 7

  • Overview 2
  • Commits 1
  • Changes 1

In 74a9838c (golang: tests: Fix for Pytest ≥ 7.4) I fixed test_defer_excchain_dump_pytest for Pytest ≥ 7.4 but missed that pytest.version_tuple is not available for Pytest < 7.0(*) which started to lead to pygolang test failures on py3 under SlapOS becuase there we are still using pytest 4.6.11 :

_______________________ test_defer_excchain_dump_pytest ________________________

    def test_defer_excchain_dump_pytest():
        # pytest 7.4 also changed traceback output format
        # similarly to ipython we do not need to test it becase we activate
        # pytest-related patch only on py2 for which latest pytest version is 4.6.11 .
        import pytest
>       if six.PY3 and pytest.version_tuple >= (7,4):
E       AttributeError: module 'pytest' has no attribute 'version_tuple'

https://stack.nexedi.com/test_result_module/20240920-666C5CF1/3

-> Fix that by checking pytest.version_tuple more carefully.

(*) see https://docs.pytest.org/en/stable/reference/reference.html#pytest-version-tuple

/cc @jerome

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/fix-pytest-old
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7