kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
1.99k stars 150 forks source link

Allow passing full paths to media files #32

Closed kerrickstaley closed 5 years ago

kerrickstaley commented 5 years ago

Allow passing full path to media files, rather than requiring media files to be in the CWD.

This change also fixes a bug in the unit tests: self.col.media.check() assumes that the media directory is the CWD, and so tests would fail or succeed based on the files in the CWD rather than what media files are actually in the package. We fix this by chdir'ing to self.col.media.dir() each time before running self.col.media.check().