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

Rework e2e tests to be included in coverage #73

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

juliaogris
Copy link
Contributor

Fixes #71 .

Changes proposed in this pull request:

  • rework sysl.main to take argument as optional (default sys.argv[1:]) parameter for testing
  • extend e2e tests to optionally directly call sysl.main rather than start a subprocess

@anz-bank/sysl-developers

@codecov
Copy link

codecov bot commented Feb 14, 2018

Codecov Report

Merging #73 into master will increase coverage by 1.64%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   55.74%   57.39%   +1.64%     
==========================================
  Files          36       36              
  Lines        7037     7037              
==========================================
+ Hits         3923     4039     +116     
+ Misses       3114     2998     -116
Impacted Files Coverage Δ
src/sysl/core/__main__.py 77.02% <66.66%> (+77.02%) ⬆️
src/sysl/core/syslints.py 82.78% <0%> (+3.27%) ⬆️
src/sysl/core/sysldata.py 85.32% <0%> (+4.58%) ⬆️
src/sysl/core/syslseqs.py 14.11% <0%> (+14.11%) ⬆️
src/sysl/util/argparse.py 100% <0%> (+76.92%) ⬆️

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 ef58a64...2f8782e. Read the comment docs.

])
def test_e2e(fname):
def test_e2e(fname, subprocess):
Copy link
Member

@sahejsingh sahejsingh Feb 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need subprocess=True calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I want true "end-to-end" tests from an enduser perspective, who doesn't care wether the program was written in Python or anything else.
Eventually we might swap out the executables underneath but the tests should remain the same (at least the subprocess=True ones).
It also covers cases where the command line operates unexpectedly different from calling main directly.
Does any of this convince you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. thanks!

@juliaogris juliaogris merged commit a41ecdc into anz-bank:master Feb 14, 2018
@juliaogris juliaogris deleted the fix-e2e-coverage branch February 14, 2018 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants