Example #1
0
File: item.py Project: ikn/fsmanage
 def setUp(self):
     self.item = fs.Item(test_path)
Example #2
0
File: item.py Project: ikn/fsmanage
 def test_parent_both_present(self):
     attn1 = fs.AttentionItems(parent=fs.Item(('parent', 'one')))
     attn2 = fs.AttentionItems(parent=fs.Item(('parent', 'two')))
     self.assertEqual(
         attn1.extended(attn2).parent, fs.Item(('parent', 'two')))
Example #3
0
File: item.py Project: ikn/fsmanage
 def test_non_item(self):
     self.assertNotEqual(fs.Item(test_path), test_path)
Example #4
0
File: item.py Project: ikn/fsmanage
 def test_different_paths(self):
     self.assertNotEqual(fs.Item(test_path), fs.Item(('a', 'b')))
Example #5
0
File: item.py Project: ikn/fsmanage
 def test_parent_one_missing(self):
     attn1 = fs.AttentionItems(parent=fs.Item(('parent', )))
     attn2 = fs.AttentionItems()
     self.assertEqual(attn1.extended(attn2).parent, fs.Item(('parent', )))
     self.assertEqual(attn2.extended(attn1).parent, fs.Item(('parent', )))
Example #6
0
File: item.py Project: ikn/fsmanage
 def test_items_union(self):
     attn1 = fs.AttentionItems((fs.Item(('one', )), fs.Item(('two', ))))
     attn2 = fs.AttentionItems((fs.Item(('two', )), fs.Item(('three', ))))
     self.assertCountEqual(
         attn1.extended(attn2).items, (fs.Item(('one', )), fs.Item(
             ('two', )), fs.Item(('three', ))))
Example #7
0
File: item.py Project: ikn/fsmanage
 def test_parent(self):
     self.assertEqual(self.attn.parent, fs.Item(('parent', )))
Example #8
0
File: item.py Project: ikn/fsmanage
 def test_items(self):
     self.assertEqual(self.attn.items, (fs.Item(
         ('a', 'one')), fs.Item(('a', 'two'))))
Example #9
0
File: item.py Project: ikn/fsmanage
 def setUp(self):
     self.attn = fs.AttentionItems((fs.Item(
         ('a', 'one')), fs.Item(('a', 'two'))), fs.Item(('parent', )))
Example #10
0
File: item.py Project: ikn/fsmanage
 def test_equal(self):
     self.assertEqual(fs.Item(test_path), fs.Item(test_path))