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

Run Pytest with specific phase(s)/fork(s) tests #2678

Merged
merged 1 commit into from
Oct 19, 2021
Merged

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Oct 18, 2021

Feature

Add Pytest CLI option --fork so that we can just run with specific phase(s)/fork(s) tests.

p.s. not strongly, but I like --fork rather than --phase here and wish to remove terminology "phases" one day. But open to discuss if anyone likes --phase or other names more.

Examples

Example 1: by default, it runs all available phase(s)/fork(s):

pytest eth2spec/test/phase0/sanity/test_slots.py::test_slots_1

Example 2: only run merge tests:

pytest eth2spec/test/phase0/sanity/test_slots.py::test_slots_1 --fork=merge

Example 3: only run phase0 and altair tests:

pytest eth2spec/test/phase0/sanity/test_slots.py::test_slots_1 --fork=phase0 --fork=altair 

@djrtwo
Copy link
Contributor

djrtwo commented Oct 19, 2021

I concur on the fork vs phase. It is a bit confusing in the repo right now

@djrtwo
Copy link
Contributor

djrtwo commented Oct 19, 2021

I'm going to merge these PRs because they look good and I want my fast CI!

@djrtwo djrtwo merged commit c08a8c9 into dev Oct 19, 2021
@djrtwo djrtwo deleted the run-specific-fork branch October 19, 2021 20:30
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

2 participants