GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BUG - Breaking change with allure.title annotations in 2.8.24 · Issue #536 · allure-framework/allure-python

BUG - Breaking change with allure.title annotations in 2.8.24 #536

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
BUG - Breaking change with allure.title annotations in 2.8.24#536
Copy link
Labels
theme:pytest

Description

@FerdinandNell
FerdinandNell
opened on Dec 10, 2020
Issue body actions

I'm submitting a ...

  • [ X ] bug report

What is the current behavior?

allure-pytest 2.8.24 is causing the following to happen during pytest execution:

.pyenv-usr-local-bin-python3/lib/python3.9/site-packages/allure_pytest/helper.py:19: in decorator
function.allure_display_name = test_title
AttributeError: 'NoneType' object has no attribute 'allure_display_name'

-- Have removed the @allure.title("erfde") annotations from the tests and tried again but its still doing the same thing.

Please tell us about your environment:

  • Allure version: 2.1.0
  • Test framework: pytest=6.0.1
  • Allure adaptor: allure-pytest 2.8.24

Activity

  1. sseliverstov commented on Dec 10, 2020

    @sseliverstov
    sseliverstov
    on Dec 10, 2020
    Contributor
    More actions

    @FerdinandNell can you show test code (only decorators without test body) ?

  2. FerdinandNell commented on Dec 10, 2020

    @FerdinandNell
    FerdinandNell
    on Dec 10, 2020
    Author
    More actions

    @sseliverstov
    image

  3. rad96 commented on Dec 10, 2020

    @rad96
    rad96
    on Dec 10, 2020
    Contributor
    More actions

    Tried this code, working as intended 🤔

    import allure
    import unittest
    
    
    class Test(unittest.TestCase):
    
        @classmethod
        def setUpClass(cls):
            pass
    
        def setUp(self):
            pass
    
        @allure.title('Titled test - test')
        def test_test(self):
            pass
  4. FerdinandNell commented on Dec 10, 2020

    @FerdinandNell
    FerdinandNell
    on Dec 10, 2020
    Author
    More actions

    So this test class is being imported in another test class in order to re-use some of the automation logic, not sure if the import process is causing issues:

    Import:
    image

    Execution:
    image

  5. devawpshko commented on Dec 17, 2020

    @devawpshko
    devawpshko
    on Dec 17, 2020
    More actions

    python 3.8.5
    pytest 6.2.1
    allure-pytest 2.8.24

    test_trial.py:

    import pytest
    from testdata import fields
    
    @pytest.mark.parametrize("my_data", fields)
    def test_01(my_data):
        assert True
    

    testdata.py:

    import allure
    import pytest
    
    fields = [
        pytest.param(
            "value",
            id="001",
            marks=[allure.title("Some test")]
        )
    ]
    
  6. delatrie
    added
    theme:pytest
    on Dec 2, 2022
  7. delatrie commented on Dec 26, 2022

    @delatrie
    delatrie
    on Dec 26, 2022
    Contributor
    More actions

    Cannot reproduce.
    If someone still struggles with this, please let me know and provide a complete code example if possible.

    Regarding @devawpshko example, please, note, that starting from 2.8.23 @allure.title does not return a pytest mark anymore. This was done to make it possible to set a title of a fixture, something that is impossible to do with a pytest mark (see #210, #527 and pytest-dev/pytest#3960).

    I leave this issue open for a couple of weeks just in case someone will provide feedback.

  8. delatrie
    closed this as not plannedon Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme:pytest

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.