Skip to content

limit_memory for parametrized tests #33

Open
@gaborbernat

Description

@gaborbernat

Handle parametrized tests requiring differing memory limits. Currently, these tests need to be duplicated but we could use a fixture to apply dynamic memory limit or allow limit memory to be a list of limits.

@pablogsal ideas?

@pytest.mark.parametrize("count", [1, 1000])
@pytest.mark.limit_memory("1 MB")  # limit differs per parameter
def test_a(count):
    assert 'a' * count 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions