question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tests are skipped

See original GitHub issue

Hi, I just wanted to give this project a go as I want to run a rather complex data migration.

However, as soon as I add the migrator fixture to my test case it’s being skipped.

@pytest.mark.django_db
def test_datamig(migrator):
    pass

This is the test output I get:

Test session starts (platform: linux, Python 3.8.4, pytest 5.4.3, pytest-sugar 0.9.4)
cachedir: .pytest_cache
django: settings: xyz.settings (from option)
rootdir: /code, inifile: setup.cfg
plugins: django-test-migrations-1.0.0, xdist-1.34.0, celery-4.4.7, sugar-0.9.4, django-3.9.0, mock-3.3.0, Faker-4.1.2, socket-0.3.5, cov-2.10.1, forked-1.3.0
[gw0] linux Python 3.8.4 cwd: /code/sales_cockpit_be
[gw0] Python 3.8.4 (default, Jul 14 2020, 02:56:59)  -- [GCC 8.3.0]
gw0 [1]
scheduling tests via LoadScheduling

xyz/tests/test_migration.py::test_datamig s           100% ██████████
[gw0] SKIPPED xyz/tests/test_migration.py 

Results (14.02s):

       1 skipped

I also tried creating migrator manually inside the test with migrator = Migrator() or migrator_factory, but the issue persists.

I use the 1.0.0 version.

Does any1 have an idea what the reason could be?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
SaturnFromTitancommented, Nov 24, 2020

Ah of course 🤦

1reaction
stefanitskycommented, Nov 24, 2020

Is this the case? https://github.com/wemake-services/django-test-migrations/blob/master/django_test_migrations/contrib/pytest_plugin.py#L62

Thanks! Removing “–nomigrations” from setup.cfg -> [tool:pytest] -> addopts helped me. @SaturnFromTitan check your pytest config for default addopts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven is automatically skipping tests - Stack Overflow
If I run mvn verify -Pjsf-test then the project is compiled, jsf-app artifact is correctly copied into target directory and tests are skipped....
Read more >
Maven Surefire Plugin – Skipping Tests
To skip running the tests for a particular project, set the skipTests property to true. ... You can also skip the tests via...
Read more >
Skipping Tests with Maven - Baeldung
Skipping tests is often a bad idea. However, there are some situations where it could be useful — maybe when we're developing new...
Read more >
Tests get set to "skipped" - Visual Studio Feedback
Upon starting to debug a unit test, It often get set to "Skipped". It subsequently doesn't run (of course). It seems that to...
Read more >
Maven Skipping Tests - Java Guides
If you are using maven-surefire-plugin in your pom.xml then it's easy to skip running the tests for a particular project, set the skipTests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found