mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-13 18:46:17 +05:00
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Build Debian package / build (push) Waiting to run
Deploy static content to Pages / deploy (push) Waiting to run
Build Homebrew package / build (push) Waiting to run
Build GitHub Pages website / build (push) Waiting to run
Build GitHub Pages website / deploy (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Run tests / python_tests (ubuntu-22.04, 3.13) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
33 lines
900 B
Python
33 lines
900 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Tests for archivebox help command.
|
|
Verify command runs successfully and produces output.
|
|
"""
|
|
|
|
import os
|
|
import subprocess
|
|
|
|
from .fixtures import *
|
|
|
|
|
|
def test_help_runs_successfully(tmp_path):
|
|
"""Test that help command runs and produces output."""
|
|
os.chdir(tmp_path)
|
|
result = subprocess.run(['archivebox', 'help'], capture_output=True, text=True)
|
|
|
|
assert result.returncode == 0
|
|
combined = result.stdout + result.stderr
|
|
assert len(combined) > 100
|
|
assert 'archivebox' in combined.lower()
|
|
|
|
|
|
def test_help_in_initialized_dir(tmp_path, process):
|
|
"""Test help command in initialized data directory."""
|
|
os.chdir(tmp_path)
|
|
result = subprocess.run(['archivebox', 'help'], capture_output=True, text=True)
|
|
|
|
assert result.returncode == 0
|
|
combined = result.stdout + result.stderr
|
|
assert 'init' in combined
|
|
assert 'add' in combined
|