Thanks, that worked. I've run into a simple problem which may or may not be
a bug.

If there's non python files in the same directory, they're passed to the
test, but not filtered by identify(). This means if I'm writing a pdf test,
for example, and have a txt file in the same directory, the tests always
fail.

It may be more correct to run identify() and not run
extract/file_name/file_date/file_account if that fails. That may be out of
scope though.

On Thu, Nov 29, 2018 at 2:18 PM Martin Blais <[email protected]> wrote:

> Just about to leave, but very quickly, nose support is deprecated.
> Switch to pytest.
>
>
> On Thu, Nov 29, 2018 at 12:56 AM Oon-Ee Ng <[email protected]> wrote:
>
>> I've modified the utrade example in
>> https://bitbucket.org/blais/beancount/src/4c79f94e0858/examples/ingest/office/importers/utrade/?at=default
>>
>> Basically I'm using the structure recommended in 'Importing external
>> data', so I have:-
>> mainfolder -> importers -> tng -> *everything here*
>>
>> tng is the name of this particular importer, of course. I have an empty
>> __init__.py, a tng.py with my implementation (analogous to utrade_csv.py,
>> also copies the test() function from there), and a tng_test.py (copy pasted
>> with slight modifications from utrade_csv_test.py)
>>
>> When in mainfolder, I run:- nosetests -s -v importers
>>
>> And I get something I can't really debug, as text_extract isn't functions
>> I wrote, think it's autogenerated:-
>> ======================================================================
>> ERROR: Extract entries from a test file and compare against expected
>> output.
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/home/me/Files/Code/venvs/fava/lib/python3.7/site-packages/nose/case.py",
>> line 198, in runTest
>>
>>     self.test(*self.arg)
>> TypeError: test_extract() missing 3 required positional arguments:
>> 'importer', 'file', and 'pytestconfig'
>>
>> ======================================================================
>>
>> Is there something I'm missing?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAGQ70eukraPT2iYJx435Vj-Uk3b_59MXarjUGaAB4Jmsnxgc_w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAGQ70eukraPT2iYJx435Vj-Uk3b_59MXarjUGaAB4Jmsnxgc_w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhN%2BVm8QPw4MouxFkYpeQdYRHsnndsQw9pa0QF%2BreZ1f4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAK21%2BhN%2BVm8QPw4MouxFkYpeQdYRHsnndsQw9pa0QF%2BreZ1f4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAGQ70ev-5jgLc_TXnspYa8NtASmeN9DaszEkaza0X_g3Bq5Fpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to