Merge branch 'dev' into fix/atomic-checkpoint-cache-writes
This commit is contained in:
@@ -4,8 +4,9 @@ from unittest.mock import patch, MagicMock
|
||||
import pytest_httpbin
|
||||
|
||||
from scrapling.parser import Selector
|
||||
from scrapling import __version__
|
||||
from scrapling.cli import (
|
||||
shell, mcp, get, post, put, delete, fetch, stealthy_fetch
|
||||
main, shell, mcp, get, post, put, delete, fetch, stealthy_fetch
|
||||
)
|
||||
|
||||
|
||||
@@ -32,6 +33,12 @@ class TestCLI:
|
||||
def runner(self):
|
||||
return CliRunner()
|
||||
|
||||
def test_version_flag(self, runner):
|
||||
"""Test that the --version flag prints the Scrapling version and exits"""
|
||||
result = runner.invoke(main, ['--version'])
|
||||
assert result.exit_code == 0
|
||||
assert result.output.strip() == f'Scrapling, version {__version__}'
|
||||
|
||||
def test_shell_command(self, runner):
|
||||
"""Test shell command"""
|
||||
with patch('scrapling.core.shell.CustomShell') as mock_shell:
|
||||
|
||||
Reference in New Issue
Block a user