From e2e6926078420ae5e143477a416deb3309924d0c Mon Sep 17 00:00:00 2001 From: Kuan Butts Date: Fri, 24 Nov 2017 11:49:07 -0800 Subject: [PATCH] Handle MPL display and .use for travis tests --- .travis.yml | 2 +- peartree/paths.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae637b2..dafbfcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ install: - pip install -r requirements.txt script: - - PYTHONPATH=. py.test + - PYTHONPATH=. MPLBACKEND="agg" py.test diff --git a/peartree/paths.py b/peartree/paths.py index 3a612ba..e5818d8 100644 --- a/peartree/paths.py +++ b/peartree/paths.py @@ -43,11 +43,11 @@ def get_representative_feed(file_loc: str, else: raise NotImplementedError('Unsupported day type string supplied.') - log(f'Selected_date: {selected_date}') - log(f'Number of trips on that date: {trip_count}') + log('Selected_date: {}'.format(selected_date)) + log('Number of trips on that date: {}'.format(trip_count)) all_service_ids = '\n\t'.join(service_ids_by_date[selected_date]) - log(f'\nAll related service IDs: \n\t{all_service_ids}') + log('\nAll related service IDs: \n\t{}'.format(all_service_ids)) sub = service_ids_by_date[selected_date] feed_query = {'trips.txt': {'service_id': sub}}