lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit ee482a333f680c1277509403ae6dc9a12280b0ee
parent 13a80655eaac245e3418d66fb7e7247d6be6efab
Author: rsiddharth <rsd@gnu.org>
Date:   Sun, 26 May 2019 14:30:58 -0400

Update LPiCal.to_ical.

* lps_gen.py (LPiCal.to_ical): Use format for formatted string.
* tests/test_lps_gen.py (TestLPiCal.test_to_ical): Update test.

Diffstat:
lps_gen.py | 2+-
tests/test_lps_gen.py | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lps_gen.py b/lps_gen.py @@ -267,7 +267,7 @@ class LPiCal(object): def to_ical(self): """Writes iCal to disk. """ - filename = 'lp%s-schedule.ics' % self.lp_year + filename = 'lp{}-schedule.ics'.format(self.lp_year) write_file(filename, self.gen_ical()) return filename diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py @@ -331,7 +331,10 @@ class TestLPiCal(object): def test_to_ical(self): """Testing LPiCal.to_ical. """ - self.purge_list.append(self.lp_ical.to_ical()) + filename = self.lp_ical.to_ical() + assert_equal(filename, 'lp2019-schedule.ics') + + self.purge_list.append(filename) @classmethod