-
Notifications
You must be signed in to change notification settings - Fork 12
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
CI cleanup and general maintenance #121
Changes from all commits
3bb0197
cfbe67f
15dd915
8ff5967
94e6b91
3f0f7ac
30ca851
2bea92b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[flake8] | ||
statistics = True | ||
max-line-length = 80 | ||
ignore = E501, B008, B011, W503 | ||
ignore = E501, B008, B011, W503, B905 | ||
select = C,E,F,W,B,B9 | ||
exclude = docs,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: Unit Tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 10 * * 3' | ||
|
||
jobs: | ||
build: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,15 @@ | |
|
||
|
||
class TestRelativeSupplyController(object): | ||
def test_low_scale(self): | ||
def test_parameter_verification(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I combined these three test cases into one as before reading all of them it wasn't clear to me what each one tested. The new name hopefully makes this clearer. |
||
pool = MockPool() | ||
with pytest.raises(Exception): | ||
with pytest.raises(AssertionError): | ||
RelativeSupplyController(pool, low_scale=0.9, high_scale=1.0) | ||
|
||
def test_high_scale(self): | ||
pool = MockPool() | ||
with pytest.raises(Exception): | ||
with pytest.raises(AssertionError): | ||
RelativeSupplyController(pool, low_scale=0.5, high_scale=0.9) | ||
|
||
def test_both_scales(self): | ||
pool = MockPool() | ||
with pytest.raises(Exception): | ||
with pytest.raises(AssertionError): | ||
RelativeSupplyController(pool, low_scale=1.1, high_scale=0.9) | ||
|
||
def test_adjustment(self): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,8 @@ def runners(self): | |
DeprecationWarning( | ||
"Accessing 'MetaRunner.runners' directly is deprecated. " | ||
"Use register_payload or run_payload with the correct flavour instead." | ||
) | ||
), | ||
stacklevel=2, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed according to flake8-bugbear:
|
||
) | ||
return self._runners | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import abc | ||
from typing import List | ||
|
||
import abc | ||
|
||
from ._pool import Pool | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import abc | ||
from typing import TypeVar, Type, TYPE_CHECKING | ||
import abc | ||
|
||
from ._partial import Partial | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
from ._pool import Pool | ||
from typing import TypeVar, Type | ||
|
||
|
||
from ._partial import Partial | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
B905 checks for the
zip(..., strict=True)
parameter, which was added only in Python 3.10.