I was just working on this same sort of problem (first importer) a couple days ago and haven't gotten back to it, but it felt like I was close. You don't mention a conftest.py file which I think is important. The documentation on this topic is just OK but I can understand why. My next move is to integrate all of the information in this past mailing list discussion: How to use pytests for personal importers / ingest (google.com)
Good luck!
--
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 beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/cca05bf7-9b0a-4650-8e97-7154c0abb2cen%40googlegroups.com.
Glad to hear it helped. Following your stuff I was then able to get mine working in about 30 minutes.
I wasn't quite sure where to put test_importer.py since you didn't mention it. Seems to be working in beancount/importers/fidelity/test_importer.py
My beancount/importers/fidelity/__init__.py is empty and the code is beancount/importers/fidelity/fidelity.py Maybe that is why I have ridiculous things like "from importers.fidelity.fidelity import Importer".
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/799dafa6-e927-41ad-87f1-7c15f7ebf403n%40googlegroups.com.
from . import ImporterBut that's because my code is in __init__.py. I think that was recommended in the docs and it does make the import statements a little cleaner. If you have yours in another file, as long as it's in the same directory, you should be able to import by:
You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/qAsQOwc9QR0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/f50e8fd3261822af61af4842b9fba06f%40axvig.com.