Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Python Test Framework docs #17

Closed
2 tasks done
kazk opened this issue Jul 8, 2020 · 14 comments
Closed
2 tasks done

Rewrite Python Test Framework docs #17

kazk opened this issue Jul 8, 2020 · 14 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/recipe New Recipe kind/reference New Refecence

Comments

@kazk
Copy link
Member

kazk commented Jul 8, 2020

  • reference
  • guide/tutorial

We currently have two Python test framework docs.

Based on these, we should create:

  • A guide for writing good tests with it (read few times when starting)
  • A reference manual you can refer to (read multiple times)

The guide should describe how to write tests. The reference should list all the assertion functions and example usages.

Later, we can also add another page for specific topics, e.g., writing random tests.

Feel free to comment for any thoughts. Also, assign yourself to let the other members know you're going to work on it.

@kazk kazk added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 8, 2020
@kazk kazk mentioned this issue Jul 8, 2020
@Blind4Basics Blind4Basics self-assigned this Jul 8, 2020
@Blind4Basics
Copy link
Contributor

Blind4Basics commented Jul 8, 2020

do we agree to describe only v2? (saying that v1 still exists in old katas should be enough. Only PUs will be facing old codes to maintain anyway, I guess)

I'll begin with the reference manual.

@Blind4Basics
Copy link
Contributor

BTW, now that we're talking about it... Should we add my module forbidder to the test framework? That would require some work, but it's already in the wild in a lot of katas and it's spreading. And it has some flaws and it already became impossible to update it everywhere, since I don't know all the places... :/

(yeah, it's "a bit" off topic... x) )

@kazk
Copy link
Member Author

kazk commented Jul 8, 2020

Yeah, focus on the v2. We can add some notes about the old one later.

For module forbidder, can you open a new issue at https://github.com/codewars/python-test-framework?

@Blind4Basics
Copy link
Contributor

done

is that repo the last version? (I believe not?) I'd like to have the code on hand so that I can check what I write about it. XD

@kazk
Copy link
Member Author

kazk commented Jul 8, 2020

Yeah, it's the version being used on Codewars.

@Blind4Basics

This comment has been minimized.

@Blind4Basics

This comment has been minimized.

@Blind4Basics

This comment has been minimized.

@kazk

This comment has been minimized.

@Blind4Basics

This comment has been minimized.

@hobovsky
Copy link
Contributor

hobovsky commented Dec 9, 2020

On structuring the test suite with describe/it:

Assertions directly in describe should be avoided. It happens to work at the moment, but it's awkward.
Top-level it should be fine. Many test frameworks don't have describe.
Top-level assertions are strongly discouraged.

So describe -> it -> assertions best, it -> assertions ok, describe -> assertions bad, assertions bad.

This was referenced Dec 16, 2020
@hobovsky
Copy link
Contributor

Created an issue dedicated to the guide here: #191.

@hobovsky
Copy link
Contributor

@kazk now #191 and #197 are done, do you consider anything more necessary in scope of this issue, or can it be closed?

@kazk
Copy link
Member Author

kazk commented Dec 30, 2020

This can be closed. Thanks everyone, for writing them.

@kazk kazk closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/recipe New Recipe kind/reference New Refecence
Projects
None yet
Development

No branches or pull requests

3 participants