Skip to content

Commit

Permalink
Merge branch 'develop' into indent-blocks
Browse files Browse the repository at this point in the history
* develop:
  Fix macOS detection logic
  Update pytest to 5.0
  • Loading branch information
jacebrowning committed Jun 29, 2019
2 parents c1477c5 + a9db011 commit 7382bf5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
9 changes: 6 additions & 3 deletions bin/checksum
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ def run(paths):
hash_md5 = hashlib.md5()

for path in paths:
with open(path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
hash_md5.update(chunk)
try:
with open(path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
hash_md5.update(chunk)
except IOError:
hash_md5.update(path.encode())

print(hash_md5.hexdigest())

Expand Down
19 changes: 7 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pylint = "^2.1"
pydocstyle = "*"

# Testing
pytest = "^4.5.0"
pytest = "^5.0"
pytest-describe = "*"
pytest-expecter = "*"
pytest-mock = "*"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# pylint: disable=unused-variable

import os
import sys
from dataclasses import dataclass
from pathlib import Path

Expand Down Expand Up @@ -210,6 +210,6 @@ class Sample:

return Sample(5, "a")

@pytest.mark.skipif(os.name != 'darwin', reason="Test only valid on macOS")
@pytest.mark.skipif(sys.platform != 'darwin', reason="Test only valid on macOS")
def it_formats_path_from_pattern(expect, sample):
expect(sample.datafile.path) == Path('/private/tmp') / '5.yml'

0 comments on commit 7382bf5

Please sign in to comment.