Skip to content

Idea: generate is now for IsNow only at moment when comparing #39

@hyzyla

Description

@hyzyla

My use case is pytest with parametrize method. In such situation, IsNow() will compare time generated when pytest will collect tests and now time when tests were run.

@pytest.mark.parametrize(
    "params, expected",
    [
        (
           {'some_key': 'some_value'},
           IsNow(),
        ),
        ...,
    ],
)
def test_handler(
    client,
    params
    expected,
):
    response = make_request(params)
    response['time'] = expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions