diff --git a/tests/unit/test_literal.py b/tests/unit/test_literal.py index 8fa5761b..c8b4c229 100644 --- a/tests/unit/test_literal.py +++ b/tests/unit/test_literal.py @@ -26,3 +26,17 @@ def test_value_assignment_assignments(): def test_assignments_invalid_section(): with pytest.raises(exceptions.AssignmentsFormatMismatch): isort.literal.assignment("\n\nx = 1\nx++", "assignments", "py") + + +def test_value_assignment_dict(): + assert ( + isort.literal.assignment("x = {3: 'c', 1: 'a', 2: 'b'}", "dict", "py") + == "x = {1: 'a', 2: 'b', 3: 'c'}" + ) + + +def test_value_assignment_unique_tuple(): + assert ( + isort.literal.assignment("x = ('a', 'b', '1', '1')", "unique-tuple", "py") + == "x = ('1', 'a', 'b')" + )