Skip to content

Commit

Permalink
Merge pull request #18 from captn3m0/old-python
Browse files Browse the repository at this point in the history
Support older python releases
  • Loading branch information
captn3m0 authored Jul 16, 2021
2 parents 2db4125 + dd8129a commit 5167dd4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Changelog
=========

Version 1.0.3
=============
- Added tests and code coverage
- PDFs can be directly fetched from Remote URLs
- PDFs can be filtered to have start and end pages
- Support for Python 3.6-3.8
- Removed --cleanup argument, since that is default

Version 1.0.2
=============
- Adds support for rotating PDFs
Expand Down
5 changes: 3 additions & 2 deletions src/pystitcher/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ def parse_args(args):
)

parser.add_argument(
'--cleanup',
action=argparse.BooleanOptionalAction,
'--no-cleanup',
action='store_false',
default=True,
dest='cleanup',
help="Delete temporary files"
)

Expand Down
15 changes: 15 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from pystitcher.skeleton import parse_args
import logging

def test_default_args():
args = parse_args(['tests/book-clean.md', 'o.pdf'])
assert args.loglevel == None
assert args.cleanup == True

def test_loglevel():
args = parse_args(['-v', 'tests/book-clean.md', 'o.pdf'])
assert args.loglevel == logging.INFO

def test_cleanup():
args = parse_args(['--no-cleanup', 'tests/book-clean.md', 'o.pdf'])
assert args.cleanup == False

0 comments on commit 5167dd4

Please sign in to comment.