コード例 #1
0
ファイル: utils_test.py プロジェクト: jubalh/mackup
    def test_confirm_yes(self):
        # Override the raw_input used in utils
        def custom_raw_input(_):
            return 'Yes'

        utils.raw_input = custom_raw_input
        assert utils.confirm('Answer Yes to this question')
コード例 #2
0
ファイル: utils_test.py プロジェクト: jubalh/mackup
    def test_confirm_typo(self):
        # Override the raw_input used in utils
        def custom_raw_input(_):
            return 'No'

        utils.raw_input = custom_raw_input
        assert not utils.confirm('Answer garbage to this question')
コード例 #3
0
    def test_confirm_typo(self):
        # Override the input used in utils
        def custom_input(_):
            return "No"

        utils.input = custom_input
        assert not utils.confirm("Answer garbage to this question")
コード例 #4
0
    def test_confirm_no(self):
        # Override the input used in utils
        def custom_input(_):
            return 'No'

        utils.input = custom_input
        assert not utils.confirm('Answer No to this question')
コード例 #5
0
    def test_confirm_yes(self):
        # Override the input used in utils
        def custom_input(_):
            return "Yes"

        utils.input = custom_input
        assert utils.confirm("Answer Yes to this question")
コード例 #6
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
    def test_confirm_typo(self):
        # Override the raw_input used in utils
        def custom_raw_input(_):
            return "No"

        utils.raw_input = custom_raw_input
        assert not utils.confirm("Answer garbage to this question")
コード例 #7
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
    def test_confirm_yes(self):
        # Override the raw_input used in utils
        def custom_raw_input(_):
            return "Yes"

        utils.raw_input = custom_raw_input
        assert utils.confirm("Answer Yes to this question")
コード例 #8
0
ファイル: utils_test.py プロジェクト: DomKM/mackup
 def test_confirm_no(self):
     # Override the raw_input used in utils
     def custom_raw_input(_):
         return 'No'
     utils.raw_input = custom_raw_input
     assert not utils.confirm('Answer No to this question')
コード例 #9
0
ファイル: utils_test.py プロジェクト: atipugin/mackup
 def test_confirm_typo(self):
     # Override the input used in utils
     def custom_input(_):
         return 'No'
     utils.input = custom_input
     assert not utils.confirm('Answer garbage to this question')
コード例 #10
0
ファイル: utils_test.py プロジェクト: atipugin/mackup
 def test_confirm_yes(self):
     # Override the input used in utils
     def custom_input(_):
         return 'Yes'
     utils.input = custom_input
     assert utils.confirm('Answer Yes to this question')