Skip to content

Commit

Permalink
Python 3 fixes - fix backend/docgen test issues with bytes vs unicode (
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano authored and Chris Livingston committed Aug 27, 2018
1 parent cf7c2e0 commit 7097aac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -59,7 +59,7 @@ def setUp(self):
)
"""))

self.create_file('src/docs/README.md', contents=dedent("""
self.create_file('src/docs/README.md', mode='w', contents=dedent("""
some text
* [[Link to the other readme file|pants('src/docs:readme2')]]
Expand All @@ -70,7 +70,7 @@ def setUp(self):
"""))

self.create_file('src/docs/README2.md', contents=dedent("""
self.create_file('src/docs/README2.md', mode='w', contents=dedent("""
This is the second readme file! Isn't it exciting?
[[link to the first readme file|pants('src/docs:readme')]]
Expand Down
Expand Up @@ -116,7 +116,7 @@ def test_rst_render_empty(self):
task.execute()

def test_rst_render_failure_fail(self):
self.create_file('bad.rst', contents=dedent("""
self.create_file('bad.rst', mode='w', contents=dedent("""
A bad link:
* `RB #2363 https://rbcommons.com/s/twitter/r/2363/>`_
Expand All @@ -138,7 +138,7 @@ def get_rendered_page(self, context, page, rendered_basename):
return pages_by_name.get(rendered_basename)

def test_rst_render_failure_warn(self):
self.create_file('bad.rst', contents=dedent("""
self.create_file('bad.rst', mode='w', contents=dedent("""
A bad link:
* `RB #2363 https://rbcommons.com/s/twitter/r/2363/>`_
Expand All @@ -164,7 +164,7 @@ def test_rst_render_failure_warn(self):
self.assertIn('A bad link:', html)

def test_rst_render_success(self):
self.create_file('good.rst', contents=dedent("""
self.create_file('good.rst', mode='w', contents=dedent("""
A good link:
* `RB #2363 <https://rbcommons.com/s/twitter/r/2363/>`_
Expand Down

0 comments on commit 7097aac

Please sign in to comment.