diff --git a/.travis.yml b/.travis.yml index f5b73bad..168c31d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ python: - "3.4" - "3.5" - "3.6" - - "3.7-dev" - # - "nightly" + # - "3.7-dev" + - "nightly" - "pypy2.7" - "pypy3.5" install: @@ -18,11 +18,11 @@ script: - python --version - behave - matrix: +matrix: allow_failures: - python: "3.7-dev" - # python: "nightly" - python: "pypy2.7" - python: "pypy3.5" + # - python: "3.7-dev" + - python: "nightly" + - python: "pypy2.7" + - python: "pypy3.5" sudo: false cache: pip diff --git a/features/data/configs/multiple_without_default.yaml b/features/data/configs/multiple_without_default.yaml deleted file mode 100644 index 74a48d48..00000000 --- a/features/data/configs/multiple_without_default.yaml +++ /dev/null @@ -1,15 +0,0 @@ -default_hour: 9 -default_minute: 0 -editor: '' -encrypt: false -highlight: true -template: false -journals: - simple: features/journals/simple.journal - work: features/journals/work.journal - ideas: features/journals/nothing.journal -linewrap: 80 -password: '' -tagsymbols: '@' -timeformat: '%Y-%m-%d %H:%M' -indent_character: "|" diff --git a/features/exporting.feature b/features/exporting.feature index 544a66ad..c73b9ff0 100644 --- a/features/exporting.feature +++ b/features/exporting.feature @@ -27,23 +27,22 @@ Feature: Exporting a Journal and the output should be parsable as json and the json output should contain entries.0.uuid = "4BB1F46946AD439996C9B59DE7C4DDC1" - @skip - Scenario: Exporting using custom templates - Given we use the config "basic.yaml" - Given we load template "sample.template" - When we run "jrnl --export sample" - Then the output should be - """ - My first entry. - --------------- - - Everything is alright - - Life is good. - ------------- - - But I'm better. - """ + # Scenario: Exporting using custom templates + # Given we use the config "basic.yaml" + # Given we load template "sample.template" + # When we run "jrnl --export sample" + # Then the output should be + # """ + # My first entry. + # --------------- + # + # Everything is alright + # + # Life is good. + # ------------- + # + # But I'm better. + # """ Scenario: Increasing Headings on Markdown export Given we use the config "markdown-headings-335.yaml" diff --git a/features/multiple_journals.feature b/features/multiple_journals.feature index 18e801e2..fb26eef8 100644 --- a/features/multiple_journals.feature +++ b/features/multiple_journals.feature @@ -39,8 +39,3 @@ Feature: Multiple journals Given we use the config "bug343.yaml" When we run "jrnl a long day in the office" Then we should see the message "No default journal configured" - - Scenario: Gracefully handle a config without a default journal - Given we use the config "multiple_without_default.yaml" - When we run "jrnl fork this repo and fix something" - Then the output should contain "You have not specified a journal. Either provide a default journal in your config file, or specify one of your journals on the command line." diff --git a/features/steps/core.py b/features/steps/core.py index ebe4a704..f0eb489b 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -10,6 +10,7 @@ import os import json import yaml import keyring +import codecs class TestKeyring(keyring.backend.KeyringBackend): @@ -48,7 +49,7 @@ def ushlex(command): def read_journal(journal_name="default"): config = util.load_config(install.CONFIG_FILE_PATH) - with open(config['journals'][journal_name]) as journal_file: + with codecs.open(config['journals'][journal_name], 'r', 'utf-8') as journal_file: journal = journal_file.read() return journal @@ -69,7 +70,7 @@ def set_config(context, config_file): install.CONFIG_FILE_PATH = os.path.abspath(full_path) if config_file.endswith("yaml"): # Add jrnl version to file for 2.x journals - with open(install.CONFIG_FILE_PATH, 'a') as cf: + with codecs.open(install.CONFIG_FILE_PATH, 'a', 'utf-8') as cf: cf.write("version: {}".format(__version__))