[Python-modules-commits] [python-textile] 01/02: Fix path to README.textile when running the tests

Dmitry Shachnev mitya57 at moszumanska.debian.org
Wed Nov 9 18:02:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository python-textile.

commit 39ca12c5b4fe280130381e8e41bed874ad720da0
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Wed Nov 9 20:53:04 2016 +0300

    Fix path to README.textile when running the tests
    
    Also, use sys.executable in one of the tests instead of
    hard-coded 'python'.
---
 tests/test_block.py | 2 +-
 tests/test_cli.py   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/test_block.py b/tests/test_block.py
index 0e6dc14..a4aec1a 100644
--- a/tests/test_block.py
+++ b/tests/test_block.py
@@ -56,7 +56,7 @@ def test_blockcode_extended():
     assert result == expect
 
 def test_blockcode_in_README():
-    with open('README.textile') as f:
+    with open('../../../README.textile') as f:
         readme = ''.join(f.readlines())
     result = textile.textile(readme)
     with open('tests/fixtures/README.txt') as f:
diff --git a/tests/test_cli.py b/tests/test_cli.py
index bc1e28d..e0a1234 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1,8 +1,9 @@
 import six
+import sys
 import subprocess
 
 def test_console_script():
-    command = ['python', '-m', 'textile', 'README.textile']
+    command = [sys.executable, '-m', 'textile', '../../../README.textile']
     try:
         result = subprocess.check_output(command)
     except AttributeError:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-textile.git



More information about the Python-modules-commits mailing list