Code Monkey home page Code Monkey logo

Comments (3)

tsbxmw avatar tsbxmw commented on August 18, 2024 1

https://github.com/allure-framework/allure2/issues/862
find the allure source code in the site packages, edit the utils.py's 3 functions.

  • def get_marker_value(item, keyword)
  • def allure_labels(item)
  • def allure_links(item)
### in utils.py
def get_marker_value(item, keyword):
    #marker = item.keywords.get(keyword)
    marker = item.get_closest_marker(keyword)
    return marker.args[0] if marker and marker.args else None


def allure_labels(item):
    for keyword in item.keywords.keys():
        if keyword.startswith(ALLURE_LABEL_PREFIX):
            #marker = item.get_marker(keyword)
            marker = item.get_closest_marker(keyword)
            label_type = marker.kwargs['label_type']
            if label_type in ALLURE_UNIQUE_LABELS:
                yield (label_type, marker.args[0])
            else:
                for value in marker.args:
                    yield (label_type, value)


def allure_links(item):
    for keyword in item.keywords.keys():
        if keyword.startswith(ALLURE_LINK_PREFIX):
            #marker = item.get_marker(keyword)
            marker = item.get_closest_marker(keyword)
            link_type = marker.kwargs['link_type']
            url = marker.args[0]
            name = marker.kwargs['name']
            yield (link_type, url, name)

from allure-pytest.

michalkrysciak avatar michalkrysciak commented on August 18, 2024

Hello. I see the same warnings with the same pytest and allure versions. And I use macOS High Sierra ver. 10.13.6.
I have a lot of tests and I see ~3500 such warnings O_o

from allure-pytest.

sseliverstov avatar sseliverstov commented on August 18, 2024

fixed

from allure-pytest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.