Hi Jeremy,

As noted in the comment, that test is currently expected to fail.  
There's something wrong with the way in which I'm incrementing my 
counter.  Currently, the ```write``` method works so long as all data 
is written in a single call, but it fails when calls are chained.

I opened a question on StackOverflow in the hopes of getting some 
insight.  Here's the thread in question:  
http://stackoverflow.com/questions/18596577/why-is-decryption-failing-after-separate-writes-to-this-file-like-object/18601160?noredirect=1#18601160

I'm currently working on the issue and hope to have it resolved shortly!

Best,
Louis

On Tue 03 Sep 2013 08:44:16 PM CEST, Jeremy R. Gray wrote:
> In ephemeral/__init__.py:
>
> > +        while self.tell() < self.size and len(lines) < n:
> > +            lines.append(self.readline())
> > +        return lines
> > +
> > +    @property
> > +    def closed(self):
> > +        if self.size == self.max_size:
> > +            raise ValueError('ambigous of closed or full')
> > +        try:
> > +            self._file.write('')
> > +            return False
> > +        except ValueError:
> > +            return True
> > +
> > +
> > +class Test_SpooledEphemeralFile(object):
> Hi Louis, I got your test suite and ran it: % nosetests .F..
> ======================================================================
> FAIL: test_io (TestEphemeralFile.TestEphemeralFile)
> ----------------------------------------------------------------------
> Traceback (most recent call last): File
> "/Users/jgray/code/ephemeral/tests/TestEphemeralFile.py", line 37, in
> test_io self.assertEqual(result, ep.read()) AssertionError: 'Now is
> the winter of our discontent, made glorious summer by this sun of
> York.' != 'Now is the winter of our
> discontent,\xf8\x87uD\x87\xa6\xb1\xfc\xe9=^\x98
> \xbb\x02\xb3X\xe5\xe6HI\x05\x84\x9d\xc6K\xa4\x97;}\x1c@
> [\x81\x07\xf6\xce`\x19\x9e\xff\x8b'
> … <#>
> ----------------------------------------------------------------------
> Ran 4 tests in 0.015s FAILED (failures=1) I was getting this kind of
> thing too, so went with re-encrypting everything in the SEFile each
> time anything gets added to it. This seems quite inefficient. I also
> wonder if this test is the right thing to test:
> self.assertEqual(result, 'Now is the time.')
> --Jeremy
> On Tue, Sep 3, 2013 at 11:46 AM, Jeremy Gray <jrgray@gmail.com> wrote:
> > sure, I'll give it a go (later this week) > > > On Tue, Sep 3, 2013
> at 11:29 AM, Louis Thibault <notifications@github.com>wrote: > In
> ephemeral/__init__.py: > > > + while self.tell() < self.size and
> len(lines) < n: > > + lines.append(self.readline()) > > + return lines
> > > + > > + @property <https://github.com/property> > > + def
> closed(self): > > + if self.size == self.max_size: > > + raise
> ValueError('ambigous of closed or full') > > + try: > > +
> self._file.write('') > > + return False > > + except ValueError: > > +
> return True > > + > > + > > +class Test_SpooledEphemeralFile(object):
> > > I just realized my test files weren't included in my previous
> commits, so > I went a head and pushed those changes. > > Would you
> mind terribly moving this test to it's own file under tests/and
> rewriting this class to make use of > unittest.TestCase? > > — > Reply
> to this email directly or view it on
> GitHub<https://github.com/louist87/ephemeral/pull/2/files#r6128720> > . >
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/louist87/ephemeral/pull/2/files#r6134138>.
>