move tests into subfolder, add missing install hooks

This commit is contained in:
Nick Sweeting
2026-01-02 00:22:07 -08:00
parent c2afb40350
commit 65ee09ceab
80 changed files with 2659 additions and 859 deletions

View File

@@ -0,0 +1,32 @@
#!/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