Skip to content

Commit 72a5764

Browse files
committed
add unittest for dict creation from sequence and kwargs
1 parent b07c135 commit 72a5764

File tree

1 file changed

+7
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests

1 file changed

+7
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_dict.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3636
# SOFTWARE.
3737

38+
3839
def assert_raises(err, fn, *args, **kwargs):
3940
raised = False
4041
try:
@@ -278,3 +279,9 @@ def test_in_dict_keys():
278279
d = {'a': 1, 'b': 2, 'c': 3}
279280
keys = d.keys()
280281
assert 'a' in keys
282+
283+
284+
def test_create_seq_and_kw():
285+
d = dict([('a', 1), ('b', 2), ('c', 3)], d=4)
286+
for k in ['a', 'b', 'c', 'd']:
287+
assert k in d

0 commit comments

Comments
 (0)