Skip to content

Commit

Permalink
PROBE
Browse files Browse the repository at this point in the history
  • Loading branch information
gilch committed Oct 4, 2024
1 parent bc1e075 commit c064cf5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from textwrap import dedent


def cmd(cmd, input="", shell=True):
def cmd(cmd, input=""):
return sp.Popen(
cmd, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE, text=True, shell=shell
cmd, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE, text=True, shell=True
).communicate(input=input)


Expand All @@ -21,17 +21,17 @@ def test_c_args():


def test_reproducible_gensym():
out, err = once = cmd('python -m hissp -c "(print `$#G)"')
again = cmd('python -m hissp -c "(print `$#G)"')
out, err = once = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
again = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
assert once == again
assert err == ""
assert "_Qz" in out


def test_unique_gensyms():
err = [None] * 2
once, err[0] = cmd('python -m hissp -c "(print `$#G)"')
again, err[1] = cmd('python -m hissp -c "0 (print `$#G)"')
once, err[0] = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
again, err[1] = cmd(["python", "-m", "hissp", "-c", '0 (print `$#G `($#G $#G))'])
assert err == ["", ""]
assert once != again
assert "_Qz" in once
Expand Down

0 comments on commit c064cf5

Please sign in to comment.