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

Add black-primer unittests #1426

Merged
merged 5 commits into from
May 17, 2020
Merged

Add black-primer unittests #1426

merged 5 commits into from
May 17, 2020

Conversation

cooperlees
Copy link
Collaborator

@cooperlees cooperlees commented May 17, 2020

  • Get this tool covered with some decent unittests for all unittests wins
  • Have a CLI and lib test class
  • Import it from test_black.py so we always run tests
  • Revert typing asyncio.Queue as Queue[str] so we can work in 3.6
  • mypy: Until black > 3.6 disallow_any_generics=False for primer code

Test:

  • Run tests: coverage run tests/test_primer.py or coverage run -m unittest
(b) cooper-mbp1:black cooper$ coverage report
Name                      Stmts   Miss  Cover
---------------------------------------------
src/black_primer/cli.py      49      8    84%
src/black_primer/lib.py     148     28    81%
tests/test_primer.py        114      1    99%
---------------------------------------------
TOTAL                       311     37    88%

Addresses #1390

- Get this tool covered with some decent unittests for all unittests wins
- Have a CLI and lib test class
- Import it from `test_black.py` so we always run tests
- Revert typing asyncio.Queue as Queue[str] so we can work in 3.6
- **mypy**: Until black > 3.6 disallow_any_generics=False for primer code

Test:
- Run tests: `coverage run tests/test_primer.py` or `coverage run -m unittest`
```
(b) cooper-mbp1:black cooper$ coverage report
Name                      Stmts   Miss  Cover
---------------------------------------------
src/black_primer/cli.py      49      8    84%
src/black_primer/lib.py     148     28    81%
tests/test_primer.py        114      1    99%
---------------------------------------------
TOTAL                       311     37    88%
```
@cooperlees cooperlees requested review from ambv, zsol and JelleZijlstra May 17, 2020 16:29
@cooperlees cooperlees merged commit 8acc22f into master May 17, 2020
@cooperlees cooperlees deleted the primer_tests branch May 17, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant