How to use the pluggy._formatdef function in pluggy

To help you get started, we’ve selected a few pluggy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pytest-dev / pluggy / testing / test_pluggy.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github web-platform-tests / wpt / tools / third_party / pluggy / testing / test_helpers.py View on Github external
assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github pytest-dev / pluggy / testing / test_pluggy.py View on Github external
assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github web-platform-tests / wpt / tools / third_party / pluggy / testing / test_helpers.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github web-platform-tests / wpt / tools / third_party / pluggy / testing / test_helpers.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github pytest-dev / pluggy / testing / test_pluggy.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github web-platform-tests / wpt / tools / third_party / pluggy / testing / test_helpers.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"
github pytest-dev / pluggy / testing / test_pluggy.py View on Github external
def test_formatdef():
    def function1():
        pass

    assert _formatdef(function1) == 'function1()'

    def function2(arg1):
        pass

    assert _formatdef(function2) == "function2(arg1)"

    def function3(arg1, arg2="qwe"):
        pass

    assert _formatdef(function3) == "function3(arg1, arg2='qwe')"

    def function4(arg1, *args, **kwargs):
        pass

    assert _formatdef(function4) == "function4(arg1, *args, **kwargs)"