From 6fecae34297a4de11a93d041ed74650c1abf7be3 Mon Sep 17 00:00:00 2001 From: yash-nisar Date: Sun, 4 Mar 2018 14:02:06 +0530 Subject: [PATCH 1/2] Fix build failure for Travis and Appveyor #36 Python3 returns 'bytes' and not 'str' when reading/writing to/from a binary stream. So, the files need to be opened in text mode for `str` related operations. Signed-off-by: Yash Nisar --- tests/test_document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_document.py b/tests/test_document.py index 1357d3dca..bb377d790 100644 --- a/tests/test_document.py +++ b/tests/test_document.py @@ -188,7 +188,7 @@ def test_write_document_tv_with_validate(self): try: temp_dir = tempfile.mkdtemp(prefix='test_spdx') result_file = os.path.join(temp_dir, 'spdx-simple.tv') - with open(result_file, 'wb') as output: + with open(result_file, 'w') as output: write_document(doc, output, validate=True) expected_file = utils_test.get_test_loc( @@ -211,7 +211,7 @@ def test_write_document_tv_with_or_later_with_validate(self): result_file = os.path.join(temp_dir, 'spdx-simple-plus.tv') # test proper! - with open(result_file, 'wb') as output: + with open(result_file, 'w') as output: write_document(doc, output, validate=True) expected_file = utils_test.get_test_loc( From b13408ac71d693a15c63ab6c27228dd36c4ae915 Mon Sep 17 00:00:00 2001 From: yash-nisar Date: Sun, 4 Mar 2018 16:03:32 +0530 Subject: [PATCH 2/2] Fix build failure for CircleCI #36 Signed-off-by: Yash Nisar --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index 0cbdbfe99..232d9d306 100644 --- a/circle.yml +++ b/circle.yml @@ -1,5 +1,6 @@ machine: pre: + - brew update - python --version - sudo -H pip install --upgrade virtualenv - brew install pyenv