Skip to content

Commit 4e8c08e

Browse files
committed
Stopped skipping a unit test on Windows which should pass now
1 parent 41d4aa2 commit 4e8c08e

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ News
1010
* Fixed a couple bugs in interacting with pastebuffer/clipboard on macOS and Linux
1111
* Fixed a couple bugs in edit and save commands if called when history is empty
1212
* Ability to pipe ``cmd2`` command output to a shell command is now more reliable, particularly on Windows
13+
* Fixed a bug in ``pyscript`` command on Windows related to ``\`` being interpreted as an escape
1314
* Enhancements
1415
* Ensure that path and shell command tab-completion results are alphabetically sorted
1516
* Removed feature for load command to load scripts from URLS

cmd2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,8 +1431,7 @@ def do_pyscript(self, arg, opts=None):
14311431
sys.argv.extend(arg[1:])
14321432

14331433
# Run the script - use repr formatting to escape things which need to be escaped to prevent issues on Windows
1434-
py_cmd = "run({!r})".format(script_path)
1435-
self.do_py(py_cmd)
1434+
self.do_py("run({!r})".format(script_path))
14361435

14371436
# Restore command line arguments to original state
14381437
sys.argv = orig_args

tests/test_cmd2.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ def test_base_run_python_script(base_app, capsys, request):
131131
assert out == expected
132132

133133

134-
@pytest.mark.skipif(sys.platform == 'win32',
135-
reason="Unit test doesn't work on win32, but feature does")
136134
def test_base_run_pyscript(base_app, capsys, request):
137135
test_dir = os.path.dirname(request.module.__file__)
138136
python_script = os.path.join(test_dir, 'script.py')

0 commit comments

Comments
 (0)