Skip to content

Commit

Permalink
Ok fine this doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrink10 committed Feb 12, 2020
1 parent e72acfb commit d282c6e
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions tests/basilisp/cli_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import os
import platform
import re
import subprocess
import tempfile
from unittest.mock import patch

import pytest
Expand Down Expand Up @@ -81,41 +78,6 @@ def test_run_stdin(self):
assert "3\n" == result.stdout


class TestRunSubprocess:
@pytest.fixture
def run(self):
def _run(*args, **kwargs):
return subprocess.run(
["basilisp", "run", *args],
check=True,
encoding="utf-8",
env={"BASILISP_DO_NOT_CACHE_NAMESPACES": "true"},
stdout=subprocess.PIPE,
**kwargs,
).stdout

return _run

@pytest.fixture
def temp_file(self):
_, filename = tempfile.mkstemp(".lpy", "test")
try:
yield filename
finally:
os.unlink(filename)

def test_run_code(self, run):
assert "3\n" == run("-c", "(+ 1 2)")

def test_run_file(self, run, temp_file: str):
with open(temp_file, mode="w") as f:
f.write("(+ 1 2)")
assert "3\n" == run(temp_file)

def test_run_stdin(self, run):
assert "3\n" == run("-", input="(+ 1 2)")


def test_version():
runner = CliRunner()
result = runner.invoke(cli, ["version"])
Expand Down

0 comments on commit d282c6e

Please sign in to comment.