README.md: mention @pavreh's PPA for Ubuntu 18.04 users
[git-cola.git] / test / models_selection_test.py
blob87563aee80a3cb307dd1d8d10bb7afded8b3252c
1 from __future__ import absolute_import, division, unicode_literals
2 import unittest
4 import mock
6 import cola.models.selection as selection
9 class SelectionTestCase(unittest.TestCase):
11 def test_union(self):
12 t = mock.Mock()
13 t.staged = ['a']
14 t.unmerged = ['a', 'b']
15 t.modified = ['b', 'a', 'c']
16 t.untracked = ['d']
18 expect = ['a', 'b', 'c', 'd']
19 actual = selection.union(t)
20 self.assertEqual(expect, actual)
23 if __name__ == '__main__':
24 unittest.main()