Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from e32_flipped_dict import flipped_dict
2import pytest
3
4
5@pytest.mark.parametrize('d, fd', [
6 ({}, {}),
7 ({'a': 1}, {1: 'a'}),
8 ({'a': 1, 'b': 2, 'c': 3}, {1: 'a', 2: 'b', 3: 'c'}),
9 ({'a': 1, 'a': 2, 'a': 3}, {3: 'a'})
10])
11def test_flipped_dict(d, fd):
12 assert flipped_dict(d) == fd