Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bean-price --update has no tests #5

Open
blais opened this issue Dec 24, 2020 · 1 comment
Open

bean-price --update has no tests #5

blais opened this issue Dec 24, 2020 · 1 comment

Comments

@blais
Copy link
Member

blais commented Dec 24, 2020

Needs unit testing coverage.
get_price_jobs_up_to_date() is currently untested.

@doriath
Copy link
Contributor

doriath commented Mar 14, 2021

Just as FYI: bean-price currently depends on newest code of beancount from v2 branch (I think v3 branch also doesn't work). If bean-price --update is run against default v2.3.3, then following error is returned:

Traceback (most recent call last):
  File "/home/zurkowski/.local/bin/bean-price", line 10, in <module>                                                                                                                         
    sys.exit(main())                                                                                                                                                                         
  File "/home/zurkowski/.local/lib/python3.7/site-packages/beanprice/price.py", line 821, in main                                                                                            
    args, jobs, entries, dcontext = process_args()                                                                                                                                           
  File "/home/zurkowski/.local/lib/python3.7/site-packages/beanprice/price.py", line 799, in process_args                                                                                    
    args.update_compress))
  File "/home/zurkowski/.local/lib/python3.7/site-packages/beanprice/price.py", line 406, in get_price_jobs_up_to_date                                                                       
    lifetimes.trim_intervals(intervals,
AttributeError: module 'beancount.ops.lifetimes' has no attribute 'trim_intervals'

I fixed it with:

pip install --upgrade git+https://github.com/beancount/beancount.git@a78dcc2ec2552595a87fcbdb62a4271e1e9b4a58

When I have a sec, I can also try taking a stab at writing those unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants