Esempio n. 1
0
 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'))
Esempio n. 2
0
 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'))
Esempio n. 3
0
 def test_relative_path(self):
     with cd(self.path()):
         os.mkdir('rel')
         self.prepare_needs('rel')
         self.do_clean_and_build()
Esempio n. 4
0
 def execute(self, command):
     with cd(self.path()):
         return main(['needy'] + command)
Esempio n. 5
0
 def test_relative_path(self):
     with cd(self.path()):
         os.mkdir('rel')
         self.prepare_needs('rel')
         self.do_clean_and_build()
Esempio n. 6
0
 def execute(self, command):
     with cd(self.path()):
         return main(['needy'] + command)