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

add markers/tags for migration tests #138

Merged
merged 5 commits into from
Oct 28, 2020
Merged

add markers/tags for migration tests #138

merged 5 commits into from
Oct 28, 2020

Conversation

skarzi
Copy link
Collaborator

@skarzi skarzi commented Oct 4, 2020

Closes #96

@skarzi skarzi requested a review from sobolevn October 4, 2020 13:07
@skarzi skarzi self-assigned this Oct 4, 2020
@codecov
Copy link

codecov bot commented Oct 4, 2020

Codecov Report

Merging #138 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #138   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          314       316    +2     
  Branches        32        33    +1     
=========================================
+ Hits           314       316    +2     
Impacted Files Coverage Δ
django_test_migrations/contrib/unittest_case.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb218e8...b9b6fb4. Read the comment docs.

assert MIGRATION_TEST_MARKER in output_text


def test_pytest_markers():
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sobolevn what do you think about using pytester plugin to add more detailed tests of our pytest plugin?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, sure! Let's open a new issue for it! 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added issue #140

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Awesome work!

I suggest to fix docs a bit and let's merge it! 👍

README.md Outdated
To run only migrations test, use `-m` option:

```bash
pytest -m migration_test
Copy link
Member

Choose a reason for hiding this comment

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

Let's also give an example here how to ignore migration tests:

pytest -m migration_test  # runs only migraion tests
pytest -m "not migration_test"  # runs all except migration tests

README.md Outdated
To run only migrations tests, use `--tag` option:

```bash
python mange.py test --tag=migration_test
Copy link
Member

@sobolevn sobolevn Oct 4, 2020

Choose a reason for hiding this comment

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

Do we have something similar to -m "not ..." in unittest?

Copy link
Collaborator Author

@skarzi skarzi Oct 5, 2020

Choose a reason for hiding this comment

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

Yes, there is a CLI option --exclude-tag, I will add usage example to the docs

assert MIGRATION_TEST_MARKER in output_text


def test_pytest_markers():
Copy link
Member

Choose a reason for hiding this comment

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

Yes, sure! Let's open a new issue for it! 👍

@sobolevn sobolevn merged commit 2dd47f7 into master Oct 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the issue-96 branch October 28, 2020 08:56
@sobolevn
Copy link
Member

@skarzi do we have any blockers for a new version to be released?

@skarzi
Copy link
Collaborator Author

skarzi commented Oct 30, 2020

Probably 1 blocker which is MySQL support - #122 (comment)

I will take care of it whenever I find some time

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.

add possibility to run/skip only migrations tests
2 participants