class Tox < Formula include Language::Python::Virtualenv desc "Generic Python virtualenv management and test command-line tool" homepage "https://tox.readthedocs.org/" url "https://files.pythonhosted.org/packages/e9/56/7c6f0dd000a7634cae819c65a7452bb6ead29a4b1b1516ee05fe9dd5334c/tox-3.0.0.tar.gz" sha256 "96efa09710a3daeeb845561ebbe1497641d9cef2ee0aea30db6969058b2bda2f" revision 1 bottle do cellar :any_skip_relocation sha256 "f3011bfafe9ef18b1f52e26e5212379a3ce62cde43e06eb73f16659704dc2686" => :high_sierra sha256 "1253dcfb9018f067f46b9e19537468d101afd3287acc17132d3a875da1fa462b" => :sierra sha256 "2d25b952d26693cdc81574a5b98386f8dfa642723a27426895f00581ae00292e" => :el_capitan end depends_on "python" resource "pluggy" do url "https://files.pythonhosted.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz" sha256 "7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff" end resource "py" do url "https://files.pythonhosted.org/packages/f7/84/b4c6e84672c4ceb94f727f3da8344037b62cee960d80e999b1cd9b832d83/py-1.5.3.tar.gz" sha256 "29c9fab495d7528e80ba1e343b958684f4ace687327e6f789a94bf3d1915f881" end resource "six" do url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" end resource "virtualenv" do url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" end def install virtualenv_install_with_resources end test do ENV["LC_ALL"] = "en_US.UTF-8" pyver = Language::Python.major_minor_version("python3").to_s.delete(".") (testpath/"tox.ini").write <<~EOS [tox] envlist=py#{pyver} skipsdist=True [testenv] deps=pytest commands=pytest EOS (testpath/"test_trivial.py").write <<~EOS def test_trivial(): assert True EOS assert_match "usage", shell_output("#{bin}/tox --help") system "#{bin}/tox" assert_predicate testpath/".tox/py#{pyver}", :exist? end end