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

chore: filter DeprecationWarning #1670

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

waketzheng
Copy link
Contributor

When running make test_postgres_asyncpg in local machine, the following warnings raised:

============================================== warnings summary ==============================================
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
  /Users/mac10.12/github/tortoise-orm/tortoise/fields/data.py:79: DeprecationWarning: `pk` is deprecated, please use `primary_key` instead
    super().__init__(primary_key=primary_key, **kwargs)

tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
tortoise/fields/data.py:79
  /Users/mac10.12/github/tortoise-orm/tortoise/fields/data.py:79: DeprecationWarning: `index` is deprecated, please use `db_index` instead
    super().__init__(primary_key=primary_key, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
1103 passed, 85 skipped, 3 xfailed, 16 warnings in 78.73s (0:01:18)

It is caused by this line initializer(["tests.testmodels"], db_url=db_url) in conftest.py as the there is a OldStyleModel in tests/testmodels.py

These warnings do not make any sense, it is better to ignore it.

@coveralls
Copy link

coveralls commented Jun 30, 2024

Pull Request Test Coverage Report for Build 9730797859

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.094%

Totals Coverage Status
Change from base Build 9646263030: 0.0%
Covered Lines: 5906
Relevant Lines: 6531

💛 - Coveralls

@abondar abondar merged commit 717a92a into tortoise:develop Jul 16, 2024
7 checks passed
@waketzheng waketzheng deleted the filter-warning branch August 1, 2024 09:17
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.

3 participants