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

test: Use scoped session db #6979

Merged
merged 1 commit into from
May 7, 2020
Merged

Conversation

iamareebjamal
Copy link
Member

  • Use scoped session db for much faster tests
  • Move global fixtures to conftest.py
  • Change all factory base class to BaseFactory
    to change db.session to scoped in future

- Use scoped session db for much faster tests
- Move global fixtures to conftest.py
- Change all factory base class to BaseFactory
  to change db.session to scoped in future
@auto-label auto-label bot added the testing label May 7, 2020
@@ -10,13 +10,18 @@
_basedir = os.path.abspath(os.path.dirname(__file__))


def create_app():
app.config.from_object('config.TestingConfig')

Choose a reason for hiding this comment

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

Black would make changes.

)


@pytest.fixture(scope='module')

Choose a reason for hiding this comment

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

Black would make changes.

@niranjan94
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- tests/factories/base.py  1
- tests/all/conftest.py  2
         

See the complete overview on Codacy

@codecov
Copy link

codecov bot commented May 7, 2020

Codecov Report

Merging #6979 into development will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #6979   +/-   ##
============================================
  Coverage        60.87%   60.87%           
============================================
  Files              259      259           
  Lines            13564    13564           
============================================
  Hits              8257     8257           
  Misses            5307     5307           

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 673960f...71e456a. Read the comment docs.

@iamareebjamal iamareebjamal merged commit e6554b0 into fossasia:development May 7, 2020
@iamareebjamal iamareebjamal deleted the conf branch May 7, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants