monomon

joined 2 years ago
[–] [email protected] 1 points 3 months ago* (last edited 3 months ago)

This. We kinda stumbled on this pattern, and use it to great effect. Simplified code:

@pytest.fixture
def tmpfiles():
    with NamedTemporaryFile(suffix=".html") as f:
        yield f

# or for paths, which are more suitable for certain tests
# touch them so they exist
@pytest.fixture
def othertmppaths() -> list[Path]:
    f1 = Path("...")
    f1.touch()
    f2 = Path("...")
    f2.touch()

    yield [f1, f2]
    # you could delete them here if needed
    f1.unlink()

def test_foo(othertmppaths list[Path]):
    result = upload_resource(othertmppaths[0]) 
    assert result.status == 200

The context manager one will properly clean up all files.

E: Pretty website btw

[–] [email protected] 1 points 8 months ago (1 children)

From what I read, the incursion force brought AA, making it hard for Russian air. Moreover, they did strike a few nearby airfields.

[–] [email protected] 3 points 8 months ago

Same. Really happy with it.

[–] [email protected] 1 points 8 months ago

Consumer drones already exist, that can recognize you by face and follow you.

[–] [email protected] 1 points 1 year ago

Concepts like Reactive programming are widely used in web/UI contexts. The problem of connecting a UI to an underlying data set is not trivial. Several frameworks deal with this.

As was already said, concerns like Accessibility are studied academically. They have more to do with user experience than the technology, so not sure if they match your question.

view more: ‹ prev next ›