$OpenBSD: patch-jupyter_core_tests_test_command_py,v 1.1 2016/12/13 14:46:43 shadchin Exp $
--- jupyter_core/tests/test_command.py.orig	Tue Sep 13 18:22:49 2016
+++ jupyter_core/tests/test_command.py	Fri Oct  7 21:46:24 2016
@@ -78,16 +78,20 @@ def test_subcommand_not_found():
 
 @patch.object(sys, 'argv', [__file__] + sys.argv[1:])
 def test_subcommand_list(tmpdir):
+    if sys.version_info.major == 3:
+        cmd_sufx = '-3'
+    else:
+        cmd_sufx = ''
     a = tmpdir.mkdir("a")
     for cmd in ('jupyter-foo-bar',
                 'jupyter-xyz',
                 'jupyter-babel-fish'):
-        a.join(cmd).write('')
+        a.join(cmd + cmd_sufx).write('')
     b = tmpdir.mkdir("b")
     for cmd in ('jupyter-foo',
                 'jupyterstuff',
                 'jupyter-yo-eyropa-ganymyde-callysto'):
-        b.join(cmd).write('')
+        b.join(cmd + cmd_sufx).write('')
     
     path = os.pathsep.join(map(str, [a, b]))
     
@@ -101,6 +105,10 @@ def test_subcommand_list(tmpdir):
         ]
 
 def test_not_on_path(tmpdir):
+    if sys.version_info.major == 3:
+        cmd_sufx = '-3'
+    else:
+        cmd_sufx = ''
     a = tmpdir.mkdir("a")
     jupyter = a.join('jupyter')
     jupyter.write(
@@ -110,7 +118,7 @@ def test_not_on_path(tmpdir):
     witness_cmd = 'jupyter-witness'
     if sys.platform == 'win32':
         witness_cmd += '.py'
-    witness = a.join(witness_cmd)
+    witness = a.join(witness_cmd + cmd_sufx)
     witness.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")'))
     witness.chmod(0o700)
     out = check_output([sys.executable, str(jupyter), 'witness'], env={'PATH': ''})
@@ -118,6 +126,10 @@ def test_not_on_path(tmpdir):
 
 
 def test_path_priority(tmpdir):
+    if sys.version_info.major == 3:
+        cmd_sufx = '-3'
+    else:
+        cmd_sufx = ''
     a = tmpdir.mkdir("a")
     jupyter = a.join('jupyter')
     jupyter.write(
@@ -127,12 +139,12 @@ def test_path_priority(tmpdir):
     witness_cmd = 'jupyter-witness'
     if sys.platform == 'win32':
         witness_cmd += '.py'
-    witness_a = a.join(witness_cmd)
+    witness_a = a.join(witness_cmd + cmd_sufx)
     witness_a.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS A")'))
     witness_a.chmod(0o700)
 
     b = tmpdir.mkdir("b")
-    witness_b = b.join(witness_cmd)
+    witness_b = b.join(witness_cmd + cmd_sufx)
     witness_b.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")'))
     witness_b.chmod(0o700)
 
