-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cc6fdf
commit 6a37d28
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import pytest | ||
from unittest import mock | ||
|
||
from dbt.context.providers import BaseResolver | ||
|
||
|
||
class TestBaseResolver: | ||
class ResolverSubclass(BaseResolver): | ||
def __call__(self, *args: str): | ||
pass | ||
|
||
@pytest.fixture | ||
def resolver(self): | ||
return self.ResolverSubclass( | ||
db_wrapper=mock.Mock(), | ||
model=mock.Mock(), | ||
config=mock.Mock(), | ||
manifest=mock.Mock(), | ||
) | ||
|
||
@pytest.mark.parametrize( | ||
"empty,expected_resolve_limit", | ||
[(False, None), (True, 0)], | ||
) | ||
def test_resolve_limit(self, resolver, empty, expected_resolve_limit): | ||
resolver.config.args.EMPTY = empty | ||
|
||
assert resolver.resolve_limit == expected_resolve_limit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters