Example #1
0
 def test_construction(self):
     pm = PackageMap()
     self.assertFalse(pm.Contains("foo"))
     self.assertEqual(pm.size(), 0)
     pm.Add("foo", os.path.abspath(os.curdir))
     self.assertEqual(pm.size(), 1)
     self.assertTrue(pm.Contains("foo"))
     self.assertEqual(pm.GetPath("foo"), os.path.abspath(os.curdir))
Example #2
0
 def test_construction(self):
     pm = PackageMap()
     self.assertFalse(pm.Contains("foo"))
     self.assertEqual(pm.size(), 0)
     pm.Add("foo", os.path.abspath(os.curdir))
     self.assertEqual(pm.size(), 1)
     self.assertTrue(pm.Contains("foo"))
     self.assertEqual(pm.GetPath("foo"), os.path.abspath(os.curdir))
Example #3
0
 def test_populate_from_folder(self):
     pm = PackageMap()
     self.assertEqual(pm.size(), 0)
     pm.PopulateFromFolder(os.path.join(getDrakePath(), "examples",
                                        "Atlas"))
     self.assertTrue(pm.Contains("Atlas"))
     self.assertEqual(pm.GetPath("Atlas"),
                      os.path.join(getDrakePath(), "examples", "Atlas", ""))
Example #4
0
 def test_populate_from_folder(self):
     pm = PackageMap()
     self.assertEqual(pm.size(), 0)
     pm.PopulateFromFolder(
         os.path.join(getDrakePath(), "examples", "Atlas"))
     self.assertTrue(pm.Contains("Atlas"))
     self.assertEqual(pm.GetPath("Atlas"), os.path.join(
         getDrakePath(), "examples", "Atlas", ""))