-
Notifications
You must be signed in to change notification settings - Fork 47
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
XONSH support #29
Comments
Actually no tests is run in ptpython, the only test that is written for ptpython is I've not used xonsh before, but if it's only a different shell, tests shouldn't break. Could you tell me what commands you typed and how you run tests? |
I run tests by typing Maybe I invoke pytest wrongly, and these tests shouldn't run at all for xonsh (you said they don't run for ptpython either). Xonsh is python shell (you can run all python commands directly in it). |
@tkossak Thanks for opening this issue. After playing with xnosh a bit, I don't think it's easy to get pdir2 working on it. As there're many features of higher priority there, I won't put much effort into this in the near future. However, I still encourage you to go deeper to find out the root cause, because in most cases it's the REPL's inconsistency with others that caused problems, like this one. |
I'll try to figure out why tests fail, but i actually use pdir2 withy this change and it works perfectly fine under xonsh, ipython and python. |
Alright, that's good to hear. |
Hi,
I forked this repo and tried adding support to xonsh shell but i have problems with tests. Can someone more experienced with python/pytest look at these errors and tell me if I did something wrong (and what)?
Xonsh must be treated similarly to ptpython, so
PrettyDir.__repr__()
method should printself.repr_str
not return it (just like for ptpython). So I made small changes in https://github.com/tkossak/pdir2/commit/24c43ba9bb05b732c66ae09e665dbb5dc4f0e95c and it works for me. The problem is with tests, which now return these errors. For me it seems like for xonsh and ptpython this assert:result.repr_str == repr(result)
should always fail because__repr__()
always returns null string for these shells. If so, why the tests work for ptpython and not for xonsh?Thank you.
The text was updated successfully, but these errors were encountered: