コード例 #1
0
ファイル: test_install.py プロジェクト: 3kwa/conda
    def test_takes_three_args(self):
        with self.assertRaises(TypeError):
            install._remove_readonly()

        with self.assertRaises(TypeError):
            install._remove_readonly(True)

        with self.assertRaises(TypeError):
            install._remove_readonly(True, True)

        with self.assertRaises(TypeError):
            install._remove_readonly(True, True, True, True)
コード例 #2
0
ファイル: test_install.py プロジェクト: westurner/conda
    def test_takes_three_args(self):
        with self.assertRaises(TypeError):
            install._remove_readonly()

        with self.assertRaises(TypeError):
            install._remove_readonly(True)

        with self.assertRaises(TypeError):
            install._remove_readonly(True, True)

        with self.assertRaises(TypeError):
            install._remove_readonly(True, True, True, True)
コード例 #3
0
 def test_calls_func(self):
     some_path = generate_random_path()
     func = mock.Mock()
     with patch.object(install.os, 'chmod'):
         install._remove_readonly(func, some_path, {})
     func.assert_called_with(some_path)
コード例 #4
0
 def test_calls_os_chmod(self):
     some_path = generate_random_path()
     with patch.object(install.os, 'chmod') as chmod:
         install._remove_readonly(mock.Mock(), some_path, {})
     chmod.assert_called_with(some_path, stat.S_IWRITE)