yoda icon indicating copy to clipboard operation
yoda copied to clipboard

Tests and minor improvements to ciphers module

Open sarathsoma opened this issue 5 years ago • 5 comments

Short description of what this resolves:

Minor tweaks to how yoda exits during invalid inputs for ciphers module. adds tests for ciphers module.

Changes proposed in this pull request:

  • Exit with status != 0 during invalid inputs
  • Tests to ciphers module [ ceaser, atbash and rot13 ]

Status (please check what you already did):

  • [x] made PR ready for code review
  • [x] added some tests for the functionality

sarathsoma avatar Nov 23 '18 10:11 sarathsoma

@manparvesh Does this look good ? Can i work on adding more ciphers and tests ?

sarathsoma avatar Nov 26 '18 04:11 sarathsoma

@sarathsoma the tests are failing. Please fix that before adding more ciphers

manparvesh avatar Nov 26 '18 04:11 manparvesh

@manparvesh Ran the tests on the dev environment. Everything looks okay. No tests failed. Any leads on this ?

sarathsoma avatar Nov 26 '18 08:11 sarathsoma

@sarathsoma I reran the build and found that it was okay for python 2 but not for 3. For Python 3 it probably went into some infinite loop. Please take a look: https://travis-ci.org/yoda-pa/yoda/builds/458736952

I am guessing you have python 2 in your machine, please try on python 3 as well

manparvesh avatar Nov 27 '18 05:11 manparvesh

Codecov Report

Merging #235 into master will increase coverage by 2.82%. The diff coverage is 93.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   76.78%   79.61%   +2.82%     
==========================================
  Files          60       64       +4     
  Lines        3442     3522      +80     
==========================================
+ Hits         2643     2804     +161     
+ Misses        799      718      -81
Impacted Files Coverage Δ
modules/ciphers/atbash.py 100% <100%> (+70%) :arrow_up:
modules/ciphers/caesar.py 95% <100%> (+74.48%) :arrow_up:
modules/ciphers/rot13.py 94.28% <100%> (+70.75%) :arrow_up:
modules/dev.py 88.05% <50%> (+4.01%) :arrow_up:
tests/ciphers/test_rot13.py 94.44% <94.44%> (ø)
tests/ciphers/test_atbash.py 94.44% <94.44%> (ø)
tests/ciphers/test_input.py 94.44% <94.44%> (ø)
tests/ciphers/test_ceaser.py 95.45% <95.45%> (ø)
tests/dev/test_horoscope.py 92% <0%> (-4%) :arrow_down:
modules/gif.py 70% <0%> (-3.34%) :arrow_down:
... and 11 more

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 f9e5b6b...8d17f4f. Read the comment docs.

codecov-io avatar Nov 27 '18 07:11 codecov-io