-
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.
Add v6 warnings to ENS changes from pr #2411
- Loading branch information
Showing
3 changed files
with
33 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
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 @@ | ||
Add deprecation and future warnings for ENS changes in v6 |
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,19 @@ | ||
import pytest | ||
|
||
|
||
def test_resolve_deprecation_warning(ens): | ||
with pytest.warns( | ||
DeprecationWarning, | ||
match="In v6, the resolve\\(\\) method will be made internal and renamed to " | ||
"_resolve\\(\\). The 'get' param name will also change to 'fn_name'.", | ||
): | ||
ens.resolve('tester.eth') | ||
|
||
|
||
def test_resolver_future_warning(ens): | ||
with pytest.warns( | ||
FutureWarning, | ||
match="The function signature for resolver\\(\\) will change in v6 to accept 'name' as a " | ||
"param, over 'normalized_name', and the method will normalize the name internally.", | ||
): | ||
ens.resolver('tester.eth') |