Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.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.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'repeated': 0.07; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; '(the': 0.15; 'file,': 0.15; "'b'": 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'values': 0.26; 'i.e.': 0.27; 'fixed': 0.28; '-0700,': 0.29; 'character': 0.29; "i'm": 0.29; 'checks': 0.30; 'error': 0.30; 'code': 0.31; 'getting': 0.33; 'skip:s 30': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'thank': 0.36; 'two': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'think': 0.40; 'your': 0.60; 'day.': 0.63; 'times': 0.63; 'great': 0.64; 'august': 0.66; 'million': 0.72; 'day': 0.73; 'words).': 0.84 Newsgroups: comp.lang.python Date: Sun, 26 Aug 2012 11:37:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.166.233.176; posting-account=04fc6goAAACDYxuhiIAKatXLjxcOghf2 References: <6b0299df-bc24-406b-8d69-489e990d8e4f@googlegroups.com> <8447c547-8472-48c6-ad78-87989c1ce288@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 81.166.233.176 MIME-Version: 1.0 Subject: Re: Unittest - testing for filenames and filesize From: Tigerstyle To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346006223 news.xs4all.nl 6907 [2001:888:2000:d::a6]:56898 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27940 Ahhhhhh, thank you very much Rob. Fixed now. Have a great day. T kl. 19:51:54 UTC+2 s=F8ndag 26. august 2012 skrev Rob Day f=F8lgende: > On Sun, 2012-08-26 at 10:36 -0700, Tigerstyle wrote: >=20 > > self.assertEqual(statinfo.st_size, filesize) >=20 > > =20 >=20 > > I'm still getting AssertionError and the error says: 1000000 !=3Db' >=20 > >=20 >=20 > >=20 >=20 >=20 >=20 > filesize is the character 'b' repeated one million times (the contents >=20 > of the file, in other words). statinfo.st_size is the number of bytes in >=20 > the file, i.e. 1,000,000. So when your assertEqual code checks if those >=20 > two values are equal, what do you think happens?