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