示例#1
0
 def test_manifest(self):
     manifest = chewy.Manifest(_test_case_1)
     self.assertEqual(manifest.repobase, 'https://raw.github.com/mutanabbi/chewy-cmake-rep/master/')
     self.assertEqual(len(manifest.modules), 1)
     self.assertEqual(manifest.modules[0].path, 'test.cmake')
     self.assertEqual(manifest.modules[0].version, chewy.Version('2.0'))
     self.assertEqual(manifest.modules[0].description, 'sample description')
示例#2
0
 def test_module_status_1(self):
     mod = chewy.Module(_test_case_1)
     status = chewy.ModuleStatus(mod)
     status.set_remote_version(chewy.Version('1.0'))
     self.assertFalse(status.needs_update())
示例#3
0
 def test_module_alt(self):
     mod = chewy.Module(chewy.Module.PiecewiseConstruct('repobase', 'test.cmake', '1.0', 'description'))
     self.assertEqual(mod.repobase, 'repobase')
     self.assertEqual(mod.path, 'test.cmake')
     self.assertEqual(mod.version, chewy.Version('1.0'))
     self.assertEqual(mod.description, 'description')
示例#4
0
 def test_module(self):
     mod = chewy.Module(_test_case_1)
     self.assertEqual(mod.repobase, 'https://raw.github.com/mutanabbi/chewy-cmake-rep/master/')
     self.assertEqual(mod.path, 'AddBoostTests.cmake')
     self.assertEqual(mod.version, chewy.Version('2.0'))
     self.assertTrue(0 < len(mod.description))