-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
dict
compatibility making keylist feature working only with lis…
- Loading branch information
1 parent
62089a7
commit 6d6de76
Showing
6 changed files
with
60 additions
and
56 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
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
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,31 @@ | ||
import unittest | ||
from benedict import benedict | ||
|
||
|
||
class github_issue_0432_test_case(unittest.TestCase): | ||
""" | ||
This class describes a github issue 0432 test case. | ||
https://github.com/fabiocaccamo/python-benedict/issues/432 | ||
To run this specific test: | ||
- Run python -m unittest tests.github.test_issue_0432 | ||
""" | ||
|
||
def test_tuple_as_key_like_dict_432(self): | ||
d1 = {} | ||
d2 = benedict() | ||
d1[(0, 0, 1)] = "a" | ||
d2[(0, 0, 1)] = "a" | ||
self.assertEqual(d1, d2) | ||
|
||
def test_tuple_as_key_like_dict_412(self): | ||
d = {} | ||
d[("a", True)] = "test" | ||
|
||
b1 = benedict() | ||
b1[("a", True)] = "test" | ||
self.assertEqual(d, b1) | ||
|
||
b2 = benedict() | ||
b2.update({("a", True): "test"}) | ||
self.assertEqual(d, b2) |