Visitar URL original
Test outputs starting with visitor and strategy by gyermolenko · Pull Request #262 · faif/python-patterns · GitHub
The Wayback Machine - https://web.archive.org/web/20201014200353/https://github.com/faif/python-patterns/pull/262
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

Test outputs starting with visitor and strategy #262

Merged
merged 2 commits into from Jan 13, 2019

Conversation

@gyermolenko
Copy link
Contributor

@gyermolenko gyermolenko commented Jan 12, 2019

  • append_output.sh script

    • I didn't change overall script logic
    • updated output_marker according to idea discussed in #258
    • added a few notes on how script works for next readers
  • updated strategy.py and visitor.py according to new scructure

def main():
    ...

if __name__ == "__main__":
   main()

OUTPUT = """
foo
bar
"""
  • added test_outputs.py with generic test which should fit all scripts of the new structure
@codecov-io
Copy link

@codecov-io codecov-io commented Jan 12, 2019 •

Codecov Report

Merging #262 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
+ Coverage   97.65%   97.67%   +0.01%     
==========================================
  Files          61       61              
  Lines        2221     2238      +17     
==========================================
+ Hits         2169     2186      +17     
  Misses         52       52
Impacted Files Coverage Δ
behavioral/visitor.py 100% <100%> (ø) ⬆️
behavioral/strategy.py 100% <100%> (ø) ⬆️
tests/test_outputs.py 100% <100%> (ø)

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 74d363b...b88f43d. Read the comment docs.

@gyermolenko
Copy link
Contributor Author

@gyermolenko gyermolenko commented Jan 12, 2019

so I just found out from CI for py2 that contextlib.redirect_stdout is not available in py2 (only since 3.4).
Workarounds exist, but at the moment I don't see any problem performing test_outputs for py3 only.

@faif faif merged commit 040f0d0 into faif:master Jan 13, 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.