summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-01 20:19:49 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-01 20:19:49 -0400
commit4e8c08eb8fb22afa61b805f545c0d0460e79184e (patch)
treef249feee0eda6894482d45045a796271851ad7dd
parent41d4aa2e7d9957dd13786e93a1af42949c82fa25 (diff)
downloadcmd2-git-4e8c08eb8fb22afa61b805f545c0d0460e79184e.tar.gz
Stopped skipping a unit test on Windows which should pass now
-rw-r--r--CHANGES.md1
-rwxr-xr-xcmd2.py3
-rw-r--r--tests/test_cmd2.py2
3 files changed, 2 insertions, 4 deletions
diff --git a/CHANGES.md b/CHANGES.md
index b041437d..82b4a59e 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -10,6 +10,7 @@ News
* Fixed a couple bugs in interacting with pastebuffer/clipboard on macOS and Linux
* Fixed a couple bugs in edit and save commands if called when history is empty
* Ability to pipe ``cmd2`` command output to a shell command is now more reliable, particularly on Windows
+ * Fixed a bug in ``pyscript`` command on Windows related to ``\`` being interpreted as an escape
* Enhancements
* Ensure that path and shell command tab-completion results are alphabetically sorted
* Removed feature for load command to load scripts from URLS
diff --git a/cmd2.py b/cmd2.py
index 0177a18d..b04bf215 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1431,8 +1431,7 @@ Paths or arguments that contain spaces must be enclosed in quotes
sys.argv.extend(arg[1:])
# Run the script - use repr formatting to escape things which need to be escaped to prevent issues on Windows
- py_cmd = "run({!r})".format(script_path)
- self.do_py(py_cmd)
+ self.do_py("run({!r})".format(script_path))
# Restore command line arguments to original state
sys.argv = orig_args
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 1bed3c07..592e6af2 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -131,8 +131,6 @@ def test_base_run_python_script(base_app, capsys, request):
assert out == expected
-@pytest.mark.skipif(sys.platform == 'win32',
- reason="Unit test doesn't work on win32, but feature does")
def test_base_run_pyscript(base_app, capsys, request):
test_dir = os.path.dirname(request.module.__file__)
python_script = os.path.join(test_dir, 'script.py')