osxphotos/tests/test_cli_export_projects.py
Rhet Turnbull a4b4f1c288
Feature help no selection 1036 (#1042)
* Added validation for --selected

* Added test for #999 (project_info) that I missed on last branch
2023-04-08 14:34:08 -07:00

24 lines
670 B
Python

"""Test that libraries containing projects are handled correctly, #999"""
import os
import pytest
from click.testing import CliRunner
from osxphotos.cli import export
PHOTOS_DB_PROJECTS = "./tests/Test-iPhoto-Projects-10.15.7.photoslibrary"
def test_export_projects():
"""test basic export with library containing projects"""
runner = CliRunner()
cwd = os.getcwd()
# pylint: disable=not-context-manager
with runner.isolated_filesystem():
result = runner.invoke(
export, ["--library", os.path.join(cwd, PHOTOS_DB_PROJECTS), ".", "-V"]
)
assert result.exit_code == 0
assert "error: 0" in result.output