Skip to content

Commit

Permalink
index is better because it raises if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Jan 16, 2025
1 parent 96679c4 commit e0bcbb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_condabin_first_powershell(simple_env, conda_env):
out, _ = proc.communicate(timeout=5)
proc.kill()
assert not proc.poll()
assert out.find(f"{sys.prefix}\\condabin\\conda") < out.find(str(conda_env))
assert out.index(f"{sys.prefix}\\condabin\\conda") < out.index(str(conda_env))


@pytest.mark.skipif(sys.platform != "win32", reason="Cmd.exe only tested on Windows")
Expand All @@ -161,4 +161,4 @@ def test_condabin_first_cmd(simple_env, conda_env):
out, _ = proc.communicate(timeout=5)
proc.kill()
assert not proc.poll()
assert out.find(f"{sys.prefix}\\condabin\\conda") < out.find(str(conda_env))
assert out.index(f"{sys.prefix}\\condabin\\conda") < out.index(str(conda_env))

0 comments on commit e0bcbb9

Please sign in to comment.