Skip to content

Commit

Permalink
add brew audit check to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tdsmith committed Mar 24, 2015
1 parent 33c688a commit b8c7594
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions poet/test/test_poet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit b8c7594

Please sign in to comment.