Skip to content
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

[WIP] Test improvements #2131

Open
wants to merge 63 commits into
base: develop
Choose a base branch
from

Conversation

StopMotionCuber
Copy link
Contributor

This is a WIP Pull request which directly addresses #2128
Let me elaborate the idea that I have for the testing environment and the changes that I have done:

  • Move from Travis CI to Github Actions (plan is to ditch Travis CI completely once the PR is feature-complete
    • Some tests were rewritten, as Github Actions seems to have slow executors, which lead to failure of racy tests
  • Execute python tests with pytest
    • Uses a few threads -> tests testing on threads were changed
    • COLORS!!!
    • Verbose output on failure, compact output on success
  • Rewrite ALL tests that are currently done using some weird custom shell test environment to also use pytest.
    • Awesome tests have already been rewritten
    • Processes that are tested, are executed as separate processes
    • This also provides readable output
  • Make a single sections in GitHub Actions for each test suite, this provides a better overview which suite exactly failed

Please let me know if you have some general concerns about the style of this test suite. If this is not the case, I'll continue rewriting the missing tests.

PS: I'd appreciate getting a hacktoberfest-accepted label for this PR once it is feature-complete

It's safe to assume that after 6 years everyone is on psutil version > 2.0.0
…ed for test classes that should get tested directly
…ok at the performance. This is to test on machines with high load, especially GitHub Actions
…C (this is the behaviour that was default before Python 3.8)
@StopMotionCuber
Copy link
Contributor Author

Some questions about the shell tests:
I did not manage to get busybox working fully, as there seemes to be some weird stuff going around for the jobnumber, which will show the actual job number too late, therefore the test is not passing. I could reproduce this by hand.
The behaviour is that when executing bgscript.sh & waitpid.sh the jobnumber 1 is only shown after pressing enter twice, not once how you would expect. How to proceed here?

Fish is also not passing, but this was not included for Travis CI tests before, so maybe something is diverging there. Can I just drop that one from the tests?

@PH111P
Copy link
Member

PH111P commented Oct 25, 2020

I guess for now it would be OK to drop these tests; perhaps we should look into them again later, though.

@destinehacker
Copy link

its a fake code sorry 8cee18d

@Antiz96
Copy link
Contributor

Antiz96 commented Feb 27, 2024

Hi,

We are trying to stop using python setup.py test in packages on Arch Linux side. I understand that the changes addressed by this PR are representing a huge effort but, since it didn't get much attention since a few year now, I was wondering if the effort is still ongoing today and if we can expect a switch to pytest at some point?

Thanks a lot for your work!

@StopMotionCuber
Copy link
Contributor Author

Oh well, it's been a long time since I worked on it. It's not really high on my radar right now and I don't really use Powerline itself anymore, but am rather going for alternatives. Could take a look how the state is right now if I find time for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants