Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:openSUSE:Factory:rpmlint
python-smartypants
use-sys-executable.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File use-sys-executable.patch of Package python-smartypants
Index: smartypants.py-2.0.1/tests/test_cli.py =================================================================== --- smartypants.py-2.0.1.orig/tests/test_cli.py +++ smartypants.py-2.0.1/tests/test_cli.py @@ -7,6 +7,7 @@ import os import tempfile import unittest from subprocess import PIPE, Popen +import sys CLI_SCRIPT = './smartypants' @@ -33,7 +34,7 @@ class TestCLI(unittest.TestCase): T = '"foobar"' E = '“foobar”' - output = self._p([CLI_SCRIPT], T) + output = self._p([sys.executable, CLI_SCRIPT], T) self.assertEquals(output, E) def test_pipe_attr(self): @@ -41,11 +42,11 @@ class TestCLI(unittest.TestCase): T = """"foo" ``bar''""" E = T - output = self._p([CLI_SCRIPT, '--attr', '0'], T) + output = self._p([sys.executable, CLI_SCRIPT, '--attr', '0'], T) self.assertEquals(output, E) E = """"foo" “bar”""" - output = self._p([CLI_SCRIPT, '--attr', 'b'], T) + output = self._p([sys.executable, CLI_SCRIPT, '--attr', 'b'], T) self.assertEquals(output, E) def test_skipped_elements(self): @@ -53,19 +54,19 @@ class TestCLI(unittest.TestCase): T = '<a>"foo"</a> <b>"bar"</b>' E = '<a>“foo”</a> <b>“bar”</b>' - output = self._p([CLI_SCRIPT], T) + output = self._p([sys.executable, CLI_SCRIPT], T) self.assertEquals(output, E) E = '<a>"foo"</a> <b>“bar”</b>' - output = self._p([CLI_SCRIPT, '--skip', 'a'], T) + output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'a'], T) self.assertEquals(output, E) E = '<a>“foo”</a> <b>"bar"</b>' - output = self._p([CLI_SCRIPT, '--skip', 'b'], T) + output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'b'], T) self.assertEquals(output, E) E = T - output = self._p([CLI_SCRIPT, '--skip', 'a,b'], T) + output = self._p([sys.executable, CLI_SCRIPT, '--skip', 'a,b'], T) self.assertEquals(output, E) def test_file(self): @@ -78,7 +79,7 @@ class TestCLI(unittest.TestCase): with open(F, 'w') as f: f.write(T) - output = self._p([CLI_SCRIPT, F]) + output = self._p([sys.executable, CLI_SCRIPT, F]) finally: os.remove(F) self.assertEquals(output, E)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor