Skip to content

Commit 2e19061

Browse files
committed
wip: fix gh actions
1 parent 8b1bd59 commit 2e19061

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/test-pythia.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
cat tests/test_config.py
3131
- name: Run Pythia tests
3232
run: |
33-
PYTHONPATH=. pytest
33+
PYTHONPATH=. pytest -svx --color=yes
3434
3535
Install-using-conda:
3636
runs-on: ${{ matrix.os }}

tests/test_raxmlng.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,27 @@ def test_raxmlng_init_fails_wrong_exe(raxmlng_command):
2424
with pytest.raises(
2525
RuntimeError, match="Your RAxML-NG executable does not seem to work."
2626
):
27-
with tempfile.NamedTemporaryFile("wb") as tmpfile:
28-
# Manually break the RAxML-NG file to trigger the executable-broken error
29-
tmpfile.write(b"NonSense" + raxmlng_command.read_bytes())
30-
tmpfile.flush()
31-
RAxMLNG(pathlib.Path(tmpfile.name))
27+
tmpfile = tempfile.NamedTemporaryFile("wb", delete=False)
28+
# Manually break the RAxML-NG file to trigger the executable-broken error
29+
tmpfile.write(b"NonSense" + raxmlng_command.read_bytes())
30+
tmpfile.close()
31+
os.chmod(tmpfile.name, 0o777)
32+
RAxMLNG(pathlib.Path(tmpfile.name))
33+
os.unlink(tmpfile.name)
3234

3335

3436
def test_raxmlng_init_fails_non_raxmlng_exe():
3537
with pytest.raises(
3638
RuntimeError,
3739
match="The given executable `.*` does not seem to be a RAxML-NG executable.",
3840
):
39-
with tempfile.NamedTemporaryFile("w", suffix=".sh") as tmpfile:
40-
tmpfile.write("#!/bin/bash\n")
41-
tmpfile.write("echo test\n")
42-
tmpfile.flush()
43-
os.chmod(tmpfile.name, 0o777)
44-
RAxMLNG(pathlib.Path(tmpfile.name))
41+
tmpfile = tempfile.NamedTemporaryFile("w", delete=False)
42+
tmpfile.write("#!/bin/bash\n")
43+
tmpfile.write("echo test\n")
44+
tmpfile.close()
45+
os.chmod(tmpfile.name, 0o777)
46+
RAxMLNG(pathlib.Path(tmpfile.name))
47+
os.unlink(tmpfile.name)
4548

4649

4750
def test_get_raxmlng_rfdist_results(raxmlng_rfdistance_log):

0 commit comments

Comments
 (0)