コード例 #1
0
    def test_old_get_new_command(self, settings):
        def get_new_command(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        assert compatibility_call(get_new_command, Command())
コード例 #2
0
    def test_old_side_effect(self, settings):
        def side_effect(command, new_command, _settings):
            assert command == Command() == new_command
            assert settings == _settings
            return True

        assert compatibility_call(side_effect, Command(), Command())
コード例 #3
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_old_side_effect(self, settings):
        def side_effect(command, new_command, _settings):
            assert command == Command() == new_command
            assert settings == _settings
            return True

        assert compatibility_call(side_effect, Command(), Command())
コード例 #4
0
    def test_old_match(self, settings):
        def match(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        assert compatibility_call(match, Command())
コード例 #5
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_old_get_new_command(self, settings):
        def get_new_command(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        assert compatibility_call(get_new_command, Command())
コード例 #6
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_old_match(self, settings):
        def match(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        assert compatibility_call(match, Command())
コード例 #7
0
ファイル: test_utils.py プロジェクト: tdsmith/thefuck
    def test_old_get_new_command(self, settings):
        def get_new_command(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        with pytest.warns(UserWarning):
            assert compatibility_call(get_new_command, Command())
コード例 #8
0
ファイル: test_utils.py プロジェクト: tdsmith/thefuck
    def test_old_match(self, settings):
        def match(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        with pytest.warns(UserWarning):
            assert compatibility_call(match, Command())
コード例 #9
0
ファイル: test_utils.py プロジェクト: MattKotsenas/thefuck
    def test_old_get_new_command(self, settings):
        def get_new_command(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        with pytest.warns(UserWarning):
            assert compatibility_call(get_new_command, Command())
コード例 #10
0
ファイル: test_utils.py プロジェクト: MattKotsenas/thefuck
    def test_old_match(self, settings):
        def match(command, _settings):
            assert command == Command()
            assert settings == _settings
            return True

        with pytest.warns(UserWarning):
            assert compatibility_call(match, Command())
コード例 #11
0
ファイル: test_utils.py プロジェクト: tdsmith/thefuck
    def test_side_effect(self):
        def side_effect(command, new_command):
            assert command == Command() == new_command
            return True

        assert compatibility_call(side_effect, Command(), Command())
コード例 #12
0
ファイル: test_utils.py プロジェクト: tdsmith/thefuck
    def test_get_new_command(self):
        def get_new_command(command):
            assert command == Command()
            return True

        assert compatibility_call(get_new_command, Command())
コード例 #13
0
ファイル: test_utils.py プロジェクト: tdsmith/thefuck
    def test_match(self):
        def match(command):
            assert command == Command()
            return True

        assert compatibility_call(match, Command())
コード例 #14
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_side_effect(self):
        def side_effect(command, new_command):
            assert command == Command() == new_command
            return True

        assert compatibility_call(side_effect, Command(), Command())
コード例 #15
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_get_new_command(self):
        def get_new_command(command):
            assert command == Command()
            return True

        assert compatibility_call(get_new_command, Command())
コード例 #16
0
ファイル: test_utils.py プロジェクト: aureooms/thefuck
    def test_match(self):
        def match(command):
            assert command == Command()
            return True

        assert compatibility_call(match, Command())