Fixed test for M1, added about command, closes #315
This commit is contained in:
parent
61f649e59d
commit
965e10e20f
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Rhet Turnbull
|
||||
Copyright (c) 2019-2021 Rhet Turnbull
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@ -112,6 +112,7 @@ Options:
|
||||
-h, --help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
about Print information about osxphotos including license.
|
||||
albums Print out albums found in the Photos library.
|
||||
dump Print list of all photos & associated info from the Photos...
|
||||
export Export photos from the Photos database.
|
||||
|
||||
@ -97,6 +97,7 @@ Alternatively, you can also run the command line utility like this: ``python3 -m
|
||||
-h, --help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
about Print information about osxphotos including license.
|
||||
albums Print out albums found in the Photos library.
|
||||
dump Print list of all photos & associated info from the Photos...
|
||||
export Export photos from the Photos database.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,8 @@ Constants used by osxphotos
|
||||
import os.path
|
||||
from datetime import datetime
|
||||
|
||||
OSXPHOTOS_URL = "https://github.com/RhetTbull/osxphotos"
|
||||
|
||||
# Time delta: add this to Photos times to get unix time
|
||||
# Apple Epoch is Jan 1, 2001
|
||||
TIME_DELTA = (datetime(2001, 1, 1, 0, 0) - datetime(1970, 1, 1, 0, 0)).total_seconds()
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
""" version info """
|
||||
|
||||
__version__ = "0.39.16"
|
||||
__version__ = "0.39.17"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -692,6 +692,17 @@ def test_osxphotos_help_3():
|
||||
assert "Invalid command: foo" in result.output
|
||||
|
||||
|
||||
def test_about():
|
||||
""" Test about """
|
||||
from osxphotos.__main__ import about
|
||||
|
||||
runner = CliRunner()
|
||||
cwd = os.getcwd()
|
||||
result = runner.invoke(about, [])
|
||||
assert result.exit_code == 0
|
||||
assert "MIT License" in result.output
|
||||
|
||||
|
||||
def test_query_uuid():
|
||||
import json
|
||||
import os
|
||||
@ -1576,7 +1587,7 @@ def test_export_convert_to_jpeg():
|
||||
files = glob.glob("*")
|
||||
assert sorted(files) == sorted(CLI_EXPORT_FILENAMES_CONVERT_TO_JPEG)
|
||||
large_file = pathlib.Path(CLI_EXPORT_CONVERT_TO_JPEG_LARGE_FILE)
|
||||
assert large_file.stat().st_size > 10000000
|
||||
assert large_file.stat().st_size > 7000000
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user