$OpenBSD: patch-jupyter_core_tests_test_command_py,v 1.2 2018/12/29 11:50:35 mariani Exp $
Index: jupyter_core/tests/test_command.py
--- jupyter_core/tests/test_command.py.orig
+++ jupyter_core/tests/test_command.py
@@ -98,16 +98,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]))
     
@@ -121,13 +125,17 @@ 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(
         'from jupyter_core import command; command.main()'
     )
     jupyter.chmod(0o700)
-    witness = a.join('jupyter-witness')
+    witness = a.join('jupyter-witness' + cmd_sufx)
     witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")')
     write_executable(witness, witness_src)
 
@@ -142,18 +150,22 @@ 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(
         'from jupyter_core import command; command.main()'
     )
     jupyter.chmod(0o700)
-    witness_a = a.join('jupyter-witness')
+    witness_a = a.join('jupyter-witness' + cmd_sufx)
     witness_a_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS A")')
     write_executable(witness_a, witness_a_src)
 
     b = tmpdir.mkdir("b")
-    witness_b = b.join('jupyter-witness')
+    witness_b = b.join('jupyter-witness' + cmd_sufx)
     witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")')
     write_executable(witness_b, witness_b_src)
 
