Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctests all around #283

Merged
merged 5 commits into from Feb 17, 2019
Merged

Doctests all around #283

merged 5 commits into from Feb 17, 2019

Conversation

@gyermolenko
Copy link
Contributor

@gyermolenko gyermolenko commented Feb 14, 2019

This PR is for discussion purposes but it contains changes which are ready to merge.
Please review from easiest to longest: Template, Adapter, Memento

Template: not much changed (I expect it to be the common case for other examples)

Adapter: I don't know why the diff is like that, it shows many functions I didn't touch. My advice for this particular commit is to compare before/after files by eye.
Because the important change is in one line:
before

# in main()
print(objects[0].__dict__)
# output
{'make_noise': <bound method Dog.bark of <__main__.Dog object at 0x7f631ba3fb00>>, 'obj': <__main__.Dog object at 0x7f631ba3fb00>}    # noqa flake8

after

 >>> objects[0].__dict__['obj'], objects[0].__dict__['make_noise']
(<...Dog object at 0x...>, <bound method Dog.bark of <...Dog object at 0x...>>)

"..." dots represent module and object memory address.

Memento
most of traceback is intentionally hidden under "..."

I will also describe some transition subtleties in #258 to discuss further

@faif please let me know if I should proceed with other examples.
Although this PR is ready as is.

gyermolenko added 2 commits Feb 14, 2019
@codecov-io
Copy link

@codecov-io codecov-io commented Feb 15, 2019

Codecov Report

Merging #283 into master will increase coverage by 0.14%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   72.84%   72.99%   +0.14%     
==========================================
  Files          62       62              
  Lines        2224     2177      -47     
==========================================
- Hits         1620     1589      -31     
+ Misses        604      588      -16
Impacted Files Coverage Δ
tests/test_outputs.py 100% <ø> (ø) ⬆️
patterns/behavioral/template.py 0% <0%> (-96.67%) ⬇️
patterns/behavioral/memento.py 0% <0%> (ø) ⬆️
patterns/structural/adapter.py 87.87% <60%> (+24.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 995cb42...da85a02. Read the comment docs.

@faif faif merged commit e0e9bfc into faif:master Feb 17, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.