2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
12 class PathSetTest(unittest.TestCase):
14 ps = path_set.PathSet()
15 self.assertEqual(len(ps), 0)
16 self.assertFalse(__file__ in ps)
18 self.fail('New set is not empty.')
20 ps = path_set.PathSet([__file__])
21 self.assertEqual(len(ps), 1)
22 self.assertTrue(__file__ in ps)
23 self.assertEqual(ps.pop(), os.path.realpath(__file__))
26 ps = path_set.PathSet()
28 self.assertEqual(len(ps), 1)
29 self.assertTrue(__file__ in ps)
30 self.assertEqual(ps.pop(), os.path.realpath(__file__))
32 def testDiscard(self):
33 ps = path_set.PathSet([__file__])
35 self.assertEqual(len(ps), 0)
36 self.assertFalse(__file__ in ps)
39 if __name__ == '__main__':