-
Notifications
You must be signed in to change notification settings - Fork 8
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
More tests #53
Open
carolinedil
wants to merge
32
commits into
dispel:master
Choose a base branch
from
carolinedil:more-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
More tests #53
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng to decrypt a file that has "already been decrypted" (Simply have a file that is not in encrypted form).
…ng to encrypt a file that has already been encrypted.
…t written to them.
…g to use read_file on an empty file.
…n plaintext has been encrypted and the resultant cipher text is decrypted then plaintext is altered.
…ditions with no alteration to cipher text or plaintext before restoration.
These tests don't work in all pythons we support yet, so let's work on this! Thanks for the PR! |
Used the b function from compat in order to fix the incompatabilities... also fixed the missing runner
… both our versions of python
… It will test if changes to the ciphertext will still appear in the ciphertext after decrypting then reencrypting. plaintext = "even write in it for the test" - encrypt -> ciphertext == """- - - Encrypted by jak - - - ......." - append to ciphertext "Something" -> - decrypt file -> plaintext = "even write in it for the test" - reencrypt -> ciphertext == """- - - Encrypted by jak - - - ....... Something"
See if it works now with the changes I've made. I've tested on my computer with both workon py27 and workon py36. |
…This can be changed by getting rid of the "--cov-report term-missing " part of the line I changed.
test_read_jakfile_standard_format will check if read_jakfile works as intended under regular circumstances. It is possible to make it more extensively specific, however I didn't feel that was needed test_read_jakefile_malformed will check if read_jakfile will return an error when the jakfile doesn't fit the format it ought to. I didn't know how to do it other than having the actual jakfile altered and then to return it to the form it was before (then if that doesn't work set it to how it would be when creating a new jakfile.
This test gives coverage to the error that hadn't been tested of missing key error within _select_files_logic
…e coverage. This checks that when requesting a keyfile that doesn't exist, an error will be returned that that keyfile doesn't exist.
…I added a create jakfile at the beginning of decorators in the hopes it would fix the problem of no jakfile for all the other tests in that file too.
…d something so that we write to the file and then check that the regular jakfile stays the same and our test one changes.
… check if the mock file was properly accessed, but the jakfile wasn't altered
Also parametrization and crypto cleaned up a bit.
Also got rid of straying imports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added a number of tests: