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

convert 027 cycle test #6094

Merged
merged 3 commits into from
Oct 21, 2022
Merged

convert 027 cycle test #6094

merged 3 commits into from
Oct 21, 2022

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Oct 18, 2022

resolves #6093

Description

  • converts 027_cycle_tests to pytest

Checklist

@cla-bot cla-bot bot added the cla:yes label Oct 18, 2022
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@MichelleArk MichelleArk added the Skip Changelog Skips GHA to check for changelog file label Oct 18, 2022
def models(self):
return "simple_cycle_models"

@property
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: TestSimpleCycle.test_postgres_simple_cycle and TestComplexCycle.test_postgres_simple_cycle weren't previously detected as tests because of the @property decorator:

❯ python3 -m pytest -m profile_postgres test/integration/027_cycle_tests
============================================= test session starts ==============================================
platform darwin -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/michelleark/src/dbt-core, configfile: pytest.ini
plugins: xdist-2.5.0, forked-1.4.0, csv-3.0.0, logbook-1.2.0, flaky-3.7.0, mock-3.10.0, dotenv-0.5.2, cov-4.0.0
collected 0 items                                                                                              

============================================ no tests ran in 0.98s =============================================

Removing the decorator resulted in successful test runs locally though:

❯ python3 -m pytest -m profile_postgres test/integration/027_cycle_tests
============================================= test session starts ==============================================
platform darwin -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/michelleark/src/dbt-core, configfile: pytest.ini
plugins: xdist-2.5.0, forked-1.4.0, csv-3.0.0, logbook-1.2.0, flaky-3.7.0, mock-3.10.0, dotenv-0.5.2, cov-4.0.0
collected 2 items                                                                                              

test/integration/027_cycle_tests/test_cycles.py ..                                                       [100%]

============================================== 2 passed in 2.00s ===============================================

@MichelleArk MichelleArk changed the title [WIP] convert 027 cycle test convert 027 cycle test Oct 20, 2022
@MichelleArk MichelleArk marked this pull request as ready for review October 20, 2022 18:12
@MichelleArk MichelleArk requested a review from a team as a code owner October 20, 2022 18:12
tests/functional/cycles/test_cycles.py Outdated Show resolved Hide resolved
tests/functional/cycles/test_cycles.py Outdated Show resolved Hide resolved
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

🎉 Looks good!

@MichelleArk MichelleArk merged commit 17b8266 into main Oct 21, 2022
@MichelleArk MichelleArk deleted the arky/ct-1365-027-cycle-tests branch October 21, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1365] 027_cycle_tests
3 participants