Feature help no selection 1036 (#1042)
* Added validation for --selected * Added test for #999 (project_info) that I missed on last branch
This commit is contained in:
23
tests/test_cli_export_projects.py
Normal file
23
tests/test_cli_export_projects.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user