Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108767
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ethan Furman <ethan@stoneleaf.us> |
| Newsgroups | comp.lang.python |
| Subject | Re: Quote of the day |
| Date | Wed, 18 May 2016 09:05:31 -0700 |
| Lines | 26 |
| Message-ID | <mailman.9.1463587511.27390.python-list@python.org> (permalink) |
| References | <573acd5f$0$1603$c3e8da3$5496439d@news.astraweb.com> <CAPtibM6yKT9ZSzRG39rr3QWL-op=43NtyxsAM6S6T82Asi6BeQ@mail.gmail.com> <mailman.46.1463472761.19823.python-list@python.org> <87twhxf5nl.fsf@elektro.pacujo.net> <AC4F77FB-296C-4483-A8D0-AC6BEBFA4F6C@gmail.com> <mailman.50.1463481565.19823.python-list@python.org> <nhhlr4$s2$1@news.albasani.net> <8e92e249-c46e-4b92-a93b-778879461273@googlegroups.com> <nhi24l$no9$1@news.albasani.net> <573C92CB.9070502@stoneleaf.us> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de 98zFLQk6aKX2L1zYDVO93ggNCrEraumjk++gnIwShCNQ== |
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'raises': 0.07; 'although,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'objects.': 0.09; "(it's": 0.16; 'empty.': 0.16; 'ideally,': 0.16; 'passed.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'passes': 0.18; 'tests': 0.18; 'am,': 0.23; 'code.': 0.23; 'errors': 0.23; 'passing': 0.23; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'least': 0.27; 'function': 0.28; '~ethan~': 0.29; 'objects': 0.29; "i'm": 0.30; 'that.': 0.30; 'code': 0.30; 'guess': 0.31; 'changed': 0.33; 'add': 0.34; 'could': 0.35; 'besides': 0.35; 'but': 0.36; 'created': 0.36; "wasn't": 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'building': 0.38; 'test': 0.39; 'sure': 0.39; 'does': 0.39; 'subject:the': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'determine': 0.61; 'real': 0.62; 'total': 0.62; 'success,': 0.63; 'thomas': 0.63; 'benefit': 0.66; 'subject:day': 0.67; 'score': 0.76; 'batchelder': 0.84; 'simple:': 0.84; 'subject:Quote': 0.84 |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
| In-Reply-To | <nhi24l$no9$1@news.albasani.net> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <573C92CB.9070502@stoneleaf.us> |
| X-Mailman-Original-References | <573acd5f$0$1603$c3e8da3$5496439d@news.astraweb.com> <CAPtibM6yKT9ZSzRG39rr3QWL-op=43NtyxsAM6S6T82Asi6BeQ@mail.gmail.com> <mailman.46.1463472761.19823.python-list@python.org> <87twhxf5nl.fsf@elektro.pacujo.net> <AC4F77FB-296C-4483-A8D0-AC6BEBFA4F6C@gmail.com> <mailman.50.1463481565.19823.python-list@python.org> <nhhlr4$s2$1@news.albasani.net> <8e92e249-c46e-4b92-a93b-778879461273@googlegroups.com> <nhi24l$no9$1@news.albasani.net> |
| Xref | csiph.com comp.lang.python:108767 |
Show key headers only | View raw
On 05/18/2016 08:35 AM, Thomas Mlynarczyk wrote: > On 18/05/16 17:21, Ned Batchelder wrote: >> Ideally, an empty test wouldn't be a success, but I'm not sure how >> the test runner could determine that it was empty. I guess it could >> introspect the test function to see if it had any real code in it, >> but I don't know of a test runner that does that. > > Simple: a function which does not produce at least one "failure" or > "pass" does not test anything. No need to introspect the code. Just > check if the total score of failures and passes has changed after the > function was run. Not so simple: I have tests that do nothing besides build objects. If building the objects raises no errors the test passed. Although, for the benefit of empty tests not passing I could add a do-nothing assert: self.assertTrue(created_obj) (it's a do-nothing because if the object wasn't created the test would have already failed). -- ~Ethan~
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Quote of the day Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-17 17:50 +1000
Re: Quote of the day Radek Holý <Radek1@holych.org> - 2016-05-17 10:12 +0200
Re: Quote of the day Marko Rauhamaa <marko@pacujo.net> - 2016-05-17 11:30 +0300
Re: Quote of the day Sivan Greenberg <sivan@vitakka.co> - 2016-05-17 11:53 +0300
Re: Quote of the day Paul Rudin <paul.nospam@rudin.co.uk> - 2016-05-17 10:54 +0100
Re: Quote of the day Chris Angelico <rosuav@gmail.com> - 2016-05-17 20:48 +1000
Re: Quote of the day Marko Rauhamaa <marko@pacujo.net> - 2016-05-17 15:21 +0300
Re: Quote of the day wxjmfauth@gmail.com - 2016-05-17 06:15 -0700
Re: Quote of the day wxjmfauth@gmail.com - 2016-05-18 23:50 -0700
Re: Quote of the day Paul Rudin <paul.nospam@rudin.co.uk> - 2016-05-17 15:27 +0100
Re: Quote of the day Michael Torrie <torriem@gmail.com> - 2016-05-17 13:42 -0600
Re: Quote of the day Marko Rauhamaa <marko@pacujo.net> - 2016-05-17 23:21 +0300
Re: Quote of the day Cem Karan <cfkaran2@gmail.com> - 2016-05-17 06:39 -0400
Re: Quote of the day Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2016-05-18 14:05 +0200
Re: Quote of the day Chris Angelico <rosuav@gmail.com> - 2016-05-18 22:32 +1000
Re: Quote of the day Ned Batchelder <ned@nedbatchelder.com> - 2016-05-18 08:21 -0700
Re: Quote of the day Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2016-05-18 17:35 +0200
Re: Quote of the day Ned Batchelder <ned@nedbatchelder.com> - 2016-05-18 08:47 -0700
Re: Quote of the day Ethan Furman <ethan@stoneleaf.us> - 2016-05-18 09:05 -0700
Re: Quote of the day Steven D'Aprano <steve@pearwood.info> - 2016-05-19 02:50 +1000
Re: Quote of the day Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-19 10:52 +1200
Re: Quote of the day Ethan Furman <ethan@stoneleaf.us> - 2016-05-18 16:30 -0700
Re: Quote of the day Steven D'Aprano <steve@pearwood.info> - 2016-05-19 10:43 +1000
Re: Quote of the day Ethan Furman <ethan@stoneleaf.us> - 2016-05-18 17:59 -0700
csiph-web