File: util_test.py

package info (click to toggle)
python-acme 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: python: 3,895; makefile: 173
file content (15 lines) | stat: -rw-r--r-- 380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Tests for acme.util."""
import sys

import pytest


def test_it():
    from acme.util import map_keys
    assert {'a': 'b', 'c': 'd'} == \
                     map_keys({'a': 'b', 'c': 'd'}, lambda key: key)
    assert {2: 2, 4: 4} == map_keys({1: 2, 3: 4}, lambda x: x + 1)


if __name__ == '__main__':
    sys.exit(pytest.main(sys.argv[1:] + [__file__]))  # pragma: no cover