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

Add get_catalog_for_single_relation to MockAdapter #10336

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

aranke
Copy link
Member

@aranke aranke commented Jun 18, 2024

Example failing logs:

        mock_mp_context = mock.MagicMock()
        adapter_class = adapter_factory()
>       return adapter_class(mock_config, mock_mp_context)
E       TypeError: Can't instantiate abstract class MockAdapter with abstract method get_catalog_for_single_relation

tests/unit/context/test_context.py:157: TypeError

---------- coverage: platform linux, python 3.11.9-final-0 -----------
Coverage XML written to file coverage.xml

=========================== short test summary info ============================
ERROR tests/unit/context/test_context.py::TestParseWrapper::test_unwrapped_method
ERROR tests/unit/context/test_context.py::TestParseWrapper::test_wrapped_method
ERROR tests/unit/context/test_context.py::TestRuntimeWrapper::test_unwrapped_method

Similar fix in dbt-snowflake: https://github.com/dbt-labs/dbt-snowflake/pull/1064/files#diff-89d74eae44795c1174908ac6de68178b1c8c27db47d7531a4533b72b42963856R36-R38

@cla-bot cla-bot bot added the cla:yes label Jun 18, 2024
@aranke aranke added the Skip Changelog Skips GHA to check for changelog file label Jun 18, 2024
@aranke aranke marked this pull request as ready for review June 18, 2024 20:58
@aranke aranke requested a review from a team as a code owner June 18, 2024 20:58
@aranke aranke changed the title Add get_catalog_for_single_relation to Mock Adapter Add get_catalog_for_single_relation to MockAdapter Jun 18, 2024
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.79%. Comparing base (0fdc83a) to head (d964e52).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10336      +/-   ##
==========================================
+ Coverage   86.08%   88.79%   +2.70%     
==========================================
  Files         180      180              
  Lines       22490    22490              
==========================================
+ Hits        19361    19969     +608     
+ Misses       3129     2521     -608     
Flag Coverage Δ
integration 86.08% <ø> (ø)
unit 62.19% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aranke aranke merged commit 4415731 into main Jun 18, 2024
62 checks passed
@aranke aranke deleted the gcfsr_mock_adapter branch June 18, 2024 21:09
github-actions bot pushed a commit that referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.8.latest cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants