diff --git a/.travis.yml b/.travis.yml index 1263104..995b754 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,10 @@ env: - TOXENV=py27 - TOXENV=py34 install: + - git clone https://github.com/Homebrew/homebrew.git - pip install tox +before_script: + - export PATH=$PATH:$PWD/homebrew/bin + - umask 0022 script: - tox diff --git a/poet/test/test_poet.py b/poet/test/test_poet.py index a38fcc5..2ccf7a8 100644 --- a/poet/test/test_poet.py +++ b/poet/test/test_poet.py @@ -29,3 +29,13 @@ def test_resources(): assert b'resource "py" do' in result result = poet("py.test") assert b'PackageNotInstalledWarning' in result + +def test_audit(tmpdir): + home = tmpdir.chdir() + try: + with open("pytest.rb", "wb") as f: + subprocess.check_call(["poet", "-f", "pytest"], stdout=f) + subprocess.check_call(["brew", "audit", "./pytest.rb"]) + finally: + tmpdir.join("pytest.rb").remove(ignore_errors=True) + home.chdir()