-
Notifications
You must be signed in to change notification settings - Fork 19
Tests #32
base: master
Are you sure you want to change the base?
Tests #32
Conversation
Download continues, if the comic is listed in the exclude list.
* Description contains alt text too. * index on master: 7b31df1 Description contains alt text too. * Now download-all works, with the alt-text. * Fails if it does not find an image. Examples: 1350, 1663 * Updated readme. * Updated readme. * Added exclude list to not stumble on comics without images. * my bad. * Updated readme. * Exclude list for image downloads. * Added 1350 to exclude. * Fixed conflicts from exclude list. * Fixed conflicts. * Hard coded description for 472. For the sake of completion. * Removed all comments. Except where non-trivial info is needed. * Used to cli.py with all the comments. Contains all the comments. Functionally identical.
Changelog ======== - fixed bug which stopped download of comic when there was no image. - fixed bug which did not download meta data for comic. - Added logo for the package - major refactoring - several bug fixes
Updating my fork of the repo.
* Description contains alt text too. * index on master: 7b31df1 Description contains alt text too. * Now download-all works, with the alt-text. * Fails if it does not find an image. Examples: 1350, 1663 * Updated readme. * Updated readme. * Added exclude list to not stumble on comics without images. * my bad. * Updated readme. * Exclude list for image downloads. * Added 1350 to exclude. * Fixed conflicts from exclude list. * Fixed conflicts. * Merged cleanUp. * Merged trimFat * Argparse. And short hand for options. * Check on refactoring. * No more docopts. closes tasdikrahman#10
Updating my fork of the repo.
* Description contains alt text too. * index on master: 7b31df1 Description contains alt text too. * Now download-all works, with the alt-text. * Fails if it does not find an image. Examples: 1350, 1663 * Updated readme. * Updated readme. * Added exclude list to not stumble on comics without images. * my bad. * Updated readme. * Exclude list for image downloads. * Added 1350 to exclude. * Fixed conflicts from exclude list. * Fixed conflicts. * Merged cleanUp. * Merged trimFat * Argparse. And short hand for options. * Check on refactoring. * No more docopts. * Show comic using feh. * Test files removed. * Uses xdg-open to show comics. * Updated README with new show option. Needs gif. Closes issue tasdikrahman#27
Updating my fork of the repo.
Updating my fork of the repo.
…nt double/single qoute usage.
* Description contains alt text too. * index on master: 7b31df1 Description contains alt text too. * Now download-all works, with the alt-text. * Fails if it does not find an image. Examples: 1350, 1663 * Updated readme. * Updated readme. * Added exclude list to not stumble on comics without images. * my bad. * Updated readme. * Exclude list for image downloads. * Added 1350 to exclude. * Fixed conflicts from exclude list. * Fixed conflicts. * Merged cleanUp. * Merged trimFat * Argparse. And short hand for options. * Check on refactoring. * No more docopts. * Speeling mistake. * Choose image viewer by changing IMAGE_HANDLER variable. More consistent double/single qoute usage.
Prior to this, working directory remained, for example, $WORKING_DIRECTORY/xkcd_archive/1000/, after a comic is downloaded. This is proving inconsistent during testing. If there is a download, the above is the CWD and the program exits. But, if there was no download, the CWD does not change. Remains whereever the command is executed from.
Tests check if there is a file created in the required path. Checks for both the description and image. Two comics are chosen, one regular and one from the exclude list.
xkcd_dl/cli.py
Outdated
@@ -216,6 +216,7 @@ def download_one(xkcd_dict, xkcd_num): | |||
os.rename(file_name, "{description}.jpeg".format( | |||
description=new_description) | |||
) | |||
os.chdir(WORKING_DIRECTORY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reasons for doing that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. During testing, if the download succeeds, it does not return to the WORKING_DIRECTORY
. And CWD is WD/xkcd_dl/1000/
. However, it if the comic is already downloaded, the CWD does not change.
Hey @BlitzKraft Will keep tabs on further PRs on this and |
Hey @prodicus. But requiring to install another library just for testing seems like overkill to me. EDIT: I take back what I said. pytest is way easier to use. |
Hey @BlitzKraft Saw it idling since the last 2 weeks. Thought I would ping you on this. Are you still working on this PR? |
I haven't worked on it since. Was a bit busy. Moved to a new city just last Monday. I still intend to work on it. |
Was just checking on it. Sure 👍 |
@BlitzKraft have you had any chance to work on this? |
Guys, My apologies. I got busy and haven't worked on it yet. I am not sure when I might get a chance either. @Kickball, if you are interested, please join in. |
Hey guys @Kickball @BlitzKraft Just checking if you guys are working on this? |
Hey @prodicus |
Are we happy to close this; given there has not been any activity on this for 18+ months, this PR has loads of conflicts and its purpose was already achieved in #43? |
@Kickball Yeah, I second that. Unfortunately, I haven't been able to work on this in a long time. |
Still a work in progress. Wrote two tests and they check out.
These are the TODOs I can think of. Feels like there should be more tests.
TODO: