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

Faster and bullet proof test runner #8

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Conversation

matllubos
Copy link
Contributor

No description provided.

@@ -4,17 +4,16 @@
from django.db import connections
from django.test.runner import ParallelTestSuite, DiscoverRunner

from germanium.signals import set_up, tear_down

from .connection import TestTableConnection
from .models import dynamodb_model_classes


def init_pynamodb_test_prefix(prefix=None):
for model_class in dynamodb_model_classes:
model_class._connection = None

Choose a reason for hiding this comment

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

for other reviewers, this line is necessary for the model_class._get_connection()

@@ -4,17 +4,16 @@
from django.db import connections
from django.test.runner import ParallelTestSuite, DiscoverRunner

from germanium.signals import set_up, tear_down

Choose a reason for hiding this comment

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

You should add germanium to setup.py as it is now required for the library. (not just for the failing tests, although the test app will need a germanium version bump or removal of the dependency as this app will have it on its own)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no it is not required

use test runner is not mandatory with using pydjamodb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added try except too support test runner without germanium

@coveralls
Copy link

coveralls commented Dec 29, 2021

Pull Request Test Coverage Report for Build 1635013183

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 34 of 40 (85.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 90.328%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pydjamodb/connection.py 21 24 87.5%
pydjamodb/test_runner.py 11 14 78.57%
Totals Coverage Status
Change from base Build 1582784425: -0.5%
Covered Lines: 495
Relevant Lines: 548

💛 - Coveralls

@matllubos matllubos merged commit e05eb12 into master Jan 7, 2022
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.

None yet

4 participants