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
Drop support for pytest, don't try to find node when executing fails #15
Conversation
This has caused a loss of coverage here: Lines 207 to 214 in 0a7370e
Specifically the last two lines are no longer covered, i.e. no exception is ever raised. What's going on here? It looks like you're trying to support invalid usage? |
result = c.iwill.do() | ||
assert result == 'I will do something' |
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 innocent-looking change is what causes the loss of coverage. Making only this change on master has the same effect. Something very fishy is going on and I don't really want to understand it, it looks like more things need removing.
I should have tested if I can take care of this, as well as the coverage. |
But you're gonna get rid of raise_exc soon, right? Let me know when I should get back to the other PR. |
We agreed to get rid of |
If so, you can go back to the other PR. |
By the way, I want to put a credits section in the README to include both you and your |
OK, I didn't realise you were planning on returning None. I guess that's slightly better than var_0. Are you still going to make raise_exc=True the default? I think import varname
class Foo:
@property
def bar(self):
print(varname.will())
return "abc"
Foo().bar.upper()
Beyond that, the concept of BTW, So you can expect everything except the top level node to have a parent. |
This is the real use case for As the example shown in README, it works as a router. For the use of that package, I want some functionality like if there is nothing followed, the command should be executed. For example: import cmdy
cmdy.ls() # execute ls Otherwise, hold it and let the "will" to handle it: cmdy.ls().fg() # ls() will not run the command, but fg() will do the job |
The default of It makes sense for The purpose of |
OK, I can see how you need to use |
All breaks (including #18 ) about I like this idea cmdy.ls() # run the command
cmdy.ls(_hold=True) # hold the command and wait The initial idea of |
Or if |
Now I can confirm that if a node is So that I don't have to do this if I know a node is try:
node = node.parent
except AttributeError: # will never raise
... |
Yes, the top node should always be an |
Based on discussion in #14 (comment)