beancount / beangulp

Importers framework for Beancount
GNU General Public License v2.0
59 stars 23 forks source link

ingest/importers/fileonly.py test_match failing #22

Closed blais closed 3 years ago

blais commented 6 years ago

Original report by droogmic (Bitbucket: Michael Droogleever, GitHub: droogmic).


This is linked to beancount/beancount#211. Believed to be a system specific issue.

#!python

================================================================================= FAILURES ==================================================================================
__________________________________________________________________________ TestFileOnly.test_match __________________________________________________________________________

self = <beancount.ingest.importers.fileonly_test.TestFileOnly testMethod=test_match>, filename = '/tmp/tmp3aqvnoxf'

    @unittest.skipIf(not file_type.magic, 'python-magic is not installed')
    @test_utils.docfile
    def test_match(self, filename):
        """\
            DATE,TYPE,REF #,DESCRIPTION,FEES,AMOUNT,BALANCE
            2014-04-14,BUY,14167001,BOUGHT +CSKO 50 @98.35,7.95,-4925.45,25674.63
            2014-05-08,BUY,12040838,BOUGHT +HOOL 121 @79.11,7.95,-9580.26,16094.37
            """
        importer = fileonly.Importer(
            ['Filename: .*te?mp.*',
             'MimeType: text/plain',
             'Contents:\n.*DATE,TYPE,REF #,DESCRIPTION,FEES,AMOUNT'],
            'Assets:BofA:Checking',
            basename='bofa')
        file = cache._FileMemo(filename)
>       self.assertTrue(importer.identify(file))
E       AssertionError: False is not true

fileonly_test.py:35: AssertionError
--------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------
text/x-Algol68
blais commented 6 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Fixed in 6c3e97015490ca353bdfd86b3725f6d74078756b