File: test_function_metadata.py

package info (click to toggle)
pgcli 4.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,476 kB
  • sloc: python: 10,390; sh: 67; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from pgcli.packages.parseutils.meta import FunctionMetadata


def test_function_metadata_eq():
    f1 = FunctionMetadata(
        "s", "f", ["x"], ["integer"], [], "int", False, False, False, False, None
    )
    f2 = FunctionMetadata(
        "s", "f", ["x"], ["integer"], [], "int", False, False, False, False, None
    )
    f3 = FunctionMetadata(
        "s", "g", ["x"], ["integer"], [], "int", False, False, False, False, None
    )
    assert f1 == f2
    assert f1 != f3
    assert not (f1 != f2)
    assert not (f1 == f3)
    assert hash(f1) == hash(f2)
    assert hash(f1) != hash(f3)