コード例 #1
0
 def test_cwd(self):
     old_cwd_expected = os.getcwd()
     with shell.cwd(self.data_dir_path) as old_path:
         self.assertTrue(os.path.isfile(self.ifconfig_out_name))
         self.assertEquals(old_path, old_cwd_expected)
     self.assertEquals(os.getcwd(), old_cwd_expected)
コード例 #2
0
 def cwd_wrong_arg():
     with shell.cwd('does not exist be9adc02'):
         pass
コード例 #3
0
ファイル: test_shell.py プロジェクト: brettatoms/shell.py
 def test_cwd_wrong_arg(self):
     with self.assertRaises(OSError):
         with shell.cwd('does not exist be9adc02'):
             pass
コード例 #4
0
ファイル: test_shell.py プロジェクト: brettatoms/shell.py
 def test_cwd(self):
     old_cwd_expected = os.getcwd()
     with shell.cwd(self.data_dir_path) as old_path:
         self.assertTrue(os.path.isfile(self.ifconfig_out_name));
         self.assertEquals(old_path, old_cwd_expected)
     self.assertEquals(os.getcwd(), old_cwd_expected)
コード例 #5
0
ファイル: test_shell.py プロジェクト: houqp/shell.py
 def cwd_wrong_arg():
     with shell.cwd('does not exist be9adc02'):
         pass