mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-06 14:46:52 +02:00
refactor: Move pytest fixtures to its own file
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
10
tests/fixtures.py
Normal file
10
tests/fixtures.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
@pytest.fixture
|
||||
def process(tmp_path):
|
||||
os.chdir(tmp_path)
|
||||
process = subprocess.run(['archivebox', 'init'], capture_output=True)
|
||||
return process
|
0
tests/test_args.py
Normal file
0
tests/test_args.py
Normal file
@@ -6,14 +6,7 @@ import subprocess
|
||||
from pathlib import Path
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
@pytest.fixture
|
||||
def process(tmp_path):
|
||||
os.chdir(tmp_path)
|
||||
process = subprocess.run(['archivebox', 'init'], capture_output=True)
|
||||
return process
|
||||
|
||||
from .fixtures import *
|
||||
|
||||
def test_init(tmp_path, process):
|
||||
assert "Initializing a new ArchiveBox collection in this folder..." in process.stdout.decode("utf-8")
|
||||
|
Reference in New Issue
Block a user