-
Notifications
You must be signed in to change notification settings - Fork 715
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
Many tests fail on when run locally #50
Comments
I ran the tests on both Windows and Linux but did not encountered any error. I guess this is related to some local configuration. Could you please share with me the stacktrace of failing tests? |
Here's the full output. |
@thebigmunch Thanks for the logs. I remember encountering the exact same problem. For some reason, it disappeared while I was investigatng it. This seems to be caused by my |
Instead of comparing loguru output with standard built-in formatting exceptions, add a function to generate formatted exceptions to file, and compare it with stderr while running tests.
So, I completely removed the dubious @thebigmunch Hopefully, tests should pass on your computer too, now. 👍 |
21 fails, including the exceptions formatting tests on both systems I tried (Windows and Linux). Here's the output. As just a quick note, assuming |
Erf... I'm too used to virtual environments. Thanks for the hint, I updated the tests with your suggestion. I'm not sure why one test is failing in |
Well, the future way to launch Python everywhere may become py as is already the recommended way on Windows anyway. And virtualenv may not be the only way in the future to isolate things. Moreover, I didn't add the security implications that you can't even know if Python on the PATH is even Python at all. Malware and all is possible. I haven't had time to look into the failing tests further as of yet. I probably won't have the time this weekend anyway. |
I was aware of PEP 582 but I didn't know I'm not satisfied at all with the use of Thank you for taking the time to test this. |
On the topic of isolation and testing, I'm quite spoiled by most projects using tox, including my own, for that. Would you accept a PR adding tox for testing if I put it together? On a related note, I've been quite pleased using poetry for many things, including mostly automatic virtual environments for development. Don't think it's needed like tox, but I just wanted to mention it in case it interested you.
I haven't really looked at the testing there enough to get a grasp on what you're doing with them. That's kinda what I plan on doing next to help understand the landscape better. Perhaps if you could describe it for me in advance, that might help me figure out if there's an alternative or solution quicker. |
Note: For tox, I don't mean to change Travis to use it unless you want it to. It would just be available for easier local testing. |
I agree that it would be great to have tox setup for testing. |
See also #41 - apparently I have not found the time for this myself. Feel free to give it a go. |
Ah, right. I forgot that you had opened an issue about that already : P I'd probably just start with local tox for now. |
Yeah, as discussed with @blueyed in #41, It is also quite possible to integrate it into the Travis tests, since it seems to be a good practice too. But this can be done gradually. I know
Well, I you dig into the tests, you will see that they are not "unit" tests but actually "integration" tests. The functions and expected behaviors are all checked through the public API of the Apart from that, I'm happy with the test suite which I try to stay as exhaustive as possible. The problem with testing exception formatting is that it depends on the environement they are raised from. If I raise an Exception in a test function and then format it, the traceback will contain frames from the |
Just wanted to touch base, since I haven't gotten to do anything loguru-related recently. Besides not having a lot of extra time lately, I also had a recurring shoulder/neck problem pop up much worse than previously. I've had to have my dominant arm in a sling for much of the last 8-9 days and am not sure how long until I'm back near 100%. The injury itself makes it difficult to sit and work at a computer for any useful amount of time. And the arm being in a sling makes the work much harder to do when I am. Just wanted to let you know I haven't forgotten about this : ) |
@thebigmunch Oh, I'm sorry to hear that. I really hope you will get better soon. Thank you for taking the time to inform me. Do not worry about Loguru development, things are moving at their own pace, given occupations and oligations of everyone. Take care of yourself. I wish you a quick recovery. 🙂 |
Tests should now work fine on any platform hopefully. Many modifications has been made. Also |
63 failed, 627 passed, 1 skipped, 1 xfailed
Same results on my Windows desktop and a Linux server.
Edit: Should've mentioned, just for completeness, Python 3.7 on Windows and Python 3.6 on the Linux server.
The text was updated successfully, but these errors were encountered: