Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'subject:Python': 0.05; 'definitions': 0.07; 'unittest': 0.07; 'python': 0.09; 'currently,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'code).': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:tools': 0.16; 'subject:unittest': 0.16; 'thoughts?': 0.16; 'deployment': 0.17; 'instance,': 0.17; 'shell': 0.18; 'module': 0.19; 'libraries': 0.22; "i'd": 0.22; 'script': 0.24; 'testing': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'app.': 0.29; 'deploy': 0.29; 'domain.': 0.29; 'writes:': 0.29; 'framework': 0.30; 'code': 0.31; 'url:python': 0.32; 'to:addr:python-list': 0.33; 'ben': 0.35; 'exist': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'url:org': 0.36; 'functional': 0.36; 'test': 0.36; 'too': 0.36; 'subject: (': 0.36; 'operating': 0.36; 'subject:: ': 0.38; 'unit': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'your': 0.60; 'more': 0.63; 'great': 0.64; '8bit%:43': 0.65; 'salt': 0.65; 'skip:\xe2 10': 0.66; '8bit%:46': 0.71; 'suited': 0.71; 'isolated': 0.84; 'subject:system': 0.84; 'rita': 0.91; 'hands': 0.97 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Deployment tools using Python (was: unittest for system testing) Date: Thu, 18 Oct 2012 14:30:46 +1100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: rasputin.madmonks.org X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:W6PLdLO8ACOYD8EAdVXcGLGWWu0= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350531062 news.xs4all.nl 6922 [2001:888:2000:d::a6]:39887 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31567 Rita writes: > Currently, I use a shell script to test how my system behaves before I > deploy an application. For instance, I check if fileA, fileB, and > fileC exist and if they do I go and start up my application. The operating system shell, or the deployment framework of choice, is best suited to that I think. > This works great BUT > > I would like to use python and in particular unittest module to test my > system and then deploy my app. I understand unittest is for functional > testing Well, unittest is for unit testing (testing of small isolated units of the code). There are many definitions of “functional testing”, and I don't think ‘unittest’ is a good choice for any of them. > but I think this too would be a case for it. Reserve the term “testing” for testing the code of your application, I'd recommend. Libraries designed for “testing” are not good outside that domain. > Any thoughts? If a shell program isn't up to the job, look at deployment tools like Fabric or Salt . -- \ “Two hands working can do more than a thousand clasped in | `\ prayer.” —Anonymous | _o__) | Ben Finney