-
Notifications
You must be signed in to change notification settings - Fork 284
Conversation
* refactor `taskkeeper.check_support` tests :p
f434572
to
7b6dec0
Compare
tests/golem/task/test_taskkeeper.py
Outdated
environments_manager=EnvironmentsManager(), | ||
node=dt_p2p_factory.Node(), | ||
min_price=10.0) | ||
self.assertIsInstance(tk, TaskHeaderKeeper) |
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.
8-|
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.
ugh ... that's not my code ;)
Codecov Report
@@ Coverage Diff @@
## b0.20 #4360 +/- ##
==========================================
- Coverage 88.73% 88.69% -0.05%
==========================================
Files 223 223
Lines 19754 19762 +8
==========================================
- Hits 17529 17528 -1
- Misses 2225 2234 +9 |
|
||
|
||
class TestTaskHeaderKeeper(LogTestCase): | ||
def test_init(self): |
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.
This test is redundant :)
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.
repeat after me: it's not my code ...
@property | ||
def err_reason(self): | ||
try: | ||
return list(self.desc.keys())[0] |
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.
return list(self.desc.keys())[0] | |
return next(iter(self.desc)) |
You'd need to catch a StopIteration
exception though.
taskkeeper.check_support
tests :pcloses: https://github.com/golemfactory/golem/issues/3438