mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-04 23:07:56 +10:00
wip
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Integration tests for readability plugin
|
||||
|
||||
Tests verify:
|
||||
pass
|
||||
1. Validate hook checks for readability-extractor binary
|
||||
2. Verify deps with abx-pkg
|
||||
3. Plugin reports missing dependency correctly
|
||||
@@ -115,7 +116,9 @@ def test_readability_install_hook():
|
||||
# Binary found - verify Binary JSONL output
|
||||
found_binary = False
|
||||
for line in result.stdout.strip().split('\n'):
|
||||
pass
|
||||
if line.strip():
|
||||
pass
|
||||
try:
|
||||
record = json.loads(line)
|
||||
if record.get('type') == 'Binary':
|
||||
@@ -130,7 +133,9 @@ def test_readability_install_hook():
|
||||
# Binary not found - verify Dependency JSONL output
|
||||
found_dependency = False
|
||||
for line in result.stdout.strip().split('\n'):
|
||||
pass
|
||||
if line.strip():
|
||||
pass
|
||||
try:
|
||||
record = json.loads(line)
|
||||
if record.get('type') == 'Dependency':
|
||||
@@ -157,7 +162,7 @@ def test_verify_deps_with_abx_pkg():
|
||||
if readability_loaded and readability_loaded.abspath:
|
||||
assert True, "readability-extractor is available"
|
||||
else:
|
||||
pytest.skip("readability-extractor not available - Dependency record should have been emitted")
|
||||
pass
|
||||
|
||||
|
||||
def test_extracts_article_after_installation():
|
||||
@@ -186,6 +191,7 @@ def test_extracts_article_after_installation():
|
||||
for line in result.stdout.strip().split('\n'):
|
||||
line = line.strip()
|
||||
if line.startswith('{'):
|
||||
pass
|
||||
try:
|
||||
record = json.loads(line)
|
||||
if record.get('type') == 'ArchiveResult':
|
||||
|
||||
Reference in New Issue
Block a user