示例#1
0
文件: test_cd.py 项目: ccbrown/needy
 def test_cd(self):
     root = current_directory()
     self.fs.CreateDirectory(os.path.join('tmp', 'a', 'b'))
     with cd(os.path.join('tmp', 'a')) as a:
         self.assertEqual(current_directory(), os.path.join(root, 'tmp', 'a'))
         with cd('b') as b:
             self.assertEqual(current_directory(), os.path.join(root, 'tmp', 'a', 'b'))
示例#2
0
文件: test_cd.py 项目: vmrob/needy
 def test_cd(self):
     root = current_directory()
     self.fs.CreateDirectory(os.path.join('tmp', 'a', 'b'))
     with cd(os.path.join('tmp', 'a')) as a:
         self.assertEqual(current_directory(),
                          os.path.join(root, 'tmp', 'a'))
         with cd('b') as b:
             self.assertEqual(current_directory(),
                              os.path.join(root, 'tmp', 'a', 'b'))
示例#3
0
 def test_relative_path(self):
     with cd(self.path()):
         os.mkdir('rel')
         self.prepare_needs('rel')
         self.do_clean_and_build()
示例#4
0
 def execute(self, command):
     with cd(self.path()):
         return main(['needy'] + command)
示例#5
0
 def test_relative_path(self):
     with cd(self.path()):
         os.mkdir('rel')
         self.prepare_needs('rel')
         self.do_clean_and_build()
示例#6
0
 def execute(self, command):
     with cd(self.path()):
         return main(['needy'] + command)