File: models_selection_test.py

package info (click to toggle)
git-cola 4.13.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 6,480 kB
  • sloc: python: 36,938; sh: 304; makefile: 223; xml: 100; tcl: 62
file content (15 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from cola.models import selection

from .helper import Mock


def test_union():
    t = Mock()
    t.staged = ['a']
    t.unmerged = ['a', 'b']
    t.modified = ['b', 'a', 'c']
    t.untracked = ['d']

    expect = ['a', 'b', 'c', 'd']
    actual = selection.union(t)
    assert expect == actual