Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27940

Re: Unittest - testing for filenames and filesize

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 <laddosingh@gmail.com>
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 <mailman.3847.1346003518.4697.python-list@python.org>
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> <roy-CDABA6.08285523082012@news.panix.com> <mailman.3724.1345742998.4697.python-list@python.org> <mailman.3728.1345748791.4697.python-list@python.org> <8447c547-8472-48c6-ad78-87989c1ce288@googlegroups.com> <mailman.3766.1345835099.4697.python-list@python.org> <d22938d4-2404-4fca-8e2c-04a11cb3a6c3@googlegroups.com> <mailman.3847.1346003518.4697.python-list@python.org>
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 <laddosingh@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.3848.1346006223.4697.python-list@python.org> (permalink)
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

Show key headers only | View raw


Ahhhhhh,

thank you very much Rob.

Fixed now.

Have a great day.

T

kl. 19:51:54 UTC+2 søndag 26. august 2012 skrev Rob Day følgende:
> On Sun, 2012-08-26 at 10:36 -0700, Tigerstyle wrote:
> 
> >         self.assertEqual(statinfo.st_size, filesize)
> 
> >     
> 
> > I'm still getting AssertionError and the error says: 1000000 !=b'
> 
> > 
> 
> > 
> 
> 
> 
> filesize is the character 'b' repeated one million times (the contents
> 
> of the file, in other words). statinfo.st_size is the number of bytes in
> 
> the file, i.e. 1,000,000. So when your assertEqual code checks if those
> 
> two values are equal, what do you think happens?

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-23 04:25 -0700
  Re: Unittest - testing for filenames and filesize Roy Smith <roy@panix.com> - 2012-08-23 08:28 -0400
    Re: Unittest - testing for filenames and filesize Terry Reedy <tjreedy@udel.edu> - 2012-08-23 13:29 -0400
      Re: Unittest - testing for filenames and filesize Roy Smith <roy@panix.com> - 2012-08-23 12:06 -0700
      Re: Unittest - testing for filenames and filesize Roy Smith <roy@panix.com> - 2012-08-23 12:06 -0700
        Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-24 09:20 -0700
        Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-24 09:20 -0700
          Re: Unittest - testing for filenames and filesize Robert Day <robertkday@gmail.com> - 2012-08-24 20:04 +0100
            Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-26 10:36 -0700
              Re: Unittest - testing for filenames and filesize Rob Day <rkd@rkd.me.uk> - 2012-08-26 18:51 +0100
                Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-26 11:37 -0700
                Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-26 11:37 -0700
            Re: Unittest - testing for filenames and filesize Tigerstyle <laddosingh@gmail.com> - 2012-08-26 10:36 -0700
  Re: Unittest - testing for filenames and filesize Chris Withers <chris@python.org> - 2012-08-31 17:19 +0100
    Re: Unittest - testing for filenames and filesize 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-31 22:08 -0700
    Re: Unittest - testing for filenames and filesize 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-31 22:08 -0700

csiph-web