File: TestDictionary.py

package info (click to toggle)
uranium 5.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,304 kB
  • sloc: python: 31,765; sh: 132; makefile: 12
file content (11 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
import pytest
import UM.Dictionary


def test_findKey():
    test_dict = {"omg": "zomg", "beep": "meep"}
    assert UM.Dictionary.findKey(test_dict, "zomg") == "omg"
    assert UM.Dictionary.findKey(test_dict, "meep") == "beep"

    with pytest.raises(ValueError):
        UM.Dictionary.findKey(test_dict, "Nope")