Skip to content

Emphasize test minimalism #26

@chillenzer

Description

@chillenzer

The book example is not precisely what I consider good testing in that you really can't reason whether the results are correct or not (I personally haven't read that whole book and counted all the words). For that functionality, my tests would look like

def test_word_counts():
    book_text = "hello"
    assert word_count(book_text, "hello") == 1

and so on. It is, however, a good showcase for having some resource you don't want to acquire multiple times. So, I think it would suffice to add a box somewhere saying that this is not an ideal approach for this specific problem. Do you agree?

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