示例#1
0
 def test_link_target_relative_path(self):
     with open('target.json', 'w') as target_file:
         target_file.write(self.json_template)
     sys.argv.append(os.getcwd())
     kubos.main()
     self.assertTrue(check_link(get_global_link_file(), target_key, self.test_name))
     self.assertTrue(check_link(get_local_link_file(), target_key, self.test_name))
示例#2
0
 def test_link_global(self):
     with open('module.json', 'w') as module_file:
         module_file.write(self.json_template)
     kubos.main()
     with open(get_global_link_file(), 'r') as link_file:
         link_data = json.load(link_file)
     self.assertTrue(self.test_name in link_data[module_key])
示例#3
0
 def test_link_target_relative_path(self):
     with open('target.json', 'w') as target_file:
         target_file.write(self.json_template)
     sys.argv.append(os.getcwd())
     kubos.main()
     self.assertTrue(
         check_link(get_global_link_file(), target_key, self.test_name))
     self.assertTrue(
         check_link(get_local_link_file(), target_key, self.test_name))
示例#4
0
 def test_link_relative_path(self):
     with open('module.json', 'w') as target_file:
         target_file.write(self.json_template)
     sys.argv.append(os.getcwd())
     kubos.main()
     with open(get_global_link_file(), 'r') as link_file:
         global_link_data = json.load(link_file)
     with open(get_local_link_file(), 'r') as link_file:
         local_link_data = json.load(link_file)
     self.assertTrue(self.test_name in global_link_data[module_key])
     self.assertTrue(self.test_name in local_link_data[module_key])
示例#5
0
 def test_link_target_global_to_local(self):
     sys.argv.append(self.test_name)
     kubos.main()
     self.assertTrue(
         check_link(get_global_link_file(), target_key, self.test_name))
     remove_link(get_global_link_file(), target_key, self.test_name)
示例#6
0
 def test_link_target_global(self):
     with open('target.json', 'w') as target_file:
         target_file.write(self.json_template)
     kubos.main()
     self.assertTrue(
         check_link(get_global_link_file(), target_key, self.test_name))
示例#7
0
 def test_link_target_global_to_local(self):
     sys.argv.append(self.test_name)
     kubos.main()
     self.assertTrue(check_link(get_global_link_file(), target_key, self.test_name))
     remove_link(get_global_link_file(), target_key, self.test_name)
示例#8
0
 def test_link_target_global(self):
     with open('target.json', 'w') as target_file:
         target_file.write(self.json_template)
     kubos.main()
     self.assertTrue(check_link(get_global_link_file(), target_key, self.test_name))