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

tests for ordinal behavior (#14) #29

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

tests for ordinal behavior (#14) #29

wants to merge 4 commits into from

Conversation

ftobia
Copy link
Owner

@ftobia ftobia commented Jul 2, 2016

@Bengreen I added some tests whose behavior I think should work. Thoughts?

@@ -0,0 +1,87 @@
# -*- coding: utf-8 -*-

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's this test file that has the new tests.

@Bengreen
Copy link

Bengreen commented Jul 4, 2016

I see you are aiming to be able to define a test is run third or second and other tests will be run around it to ensure it is in that position in the sequence. I am not sure how to implement that or when you would use the feature as it makes the tests very dependant upon one another.

The ordering I implemented was to make all things 0 run first then all things 1 then all 2, .... then lowest -negative up to -1. Any tests not marked with a sequence number get executed after all +ve numbers and before any -ve numbers.

So if you want a test to be run second (2) you must also specify the tests to run as first (1).

I expect it would be quite hard to implement a system that works out a pseudo sequence to create the 'second' executed test, and I am not sure when you would use it and not also need to specify the first test.

What may be better is to think how we can implement the before/after features (in your documentation driven design). it will need an exception raise when the order is not implementable (i.e. circular dependancies).

mrbean-bremen added a commit to mrbean-bremen/pytest-ordering that referenced this pull request Jul 26, 2020
- tests taken from existing PR ftobia#29
- gaps in start and end lists are filled with unordered items
mrbean-bremen added a commit to mrbean-bremen/pytest-ordering that referenced this pull request Jul 26, 2020
- tests taken from existing PR ftobia#29
- gaps in start and end lists are filled with unordered items
mrbean-bremen added a commit to mrbean-bremen/pytest-ordering that referenced this pull request Oct 19, 2020
- tests taken from existing PR ftobia#29
- gaps in start and end lists are filled with unordered items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants