PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
9 stars 14 forks source link

Can't get pytest to work #43

Closed martinholmer closed 5 years ago

martinholmer commented 5 years ago

Perhaps I'm doing something wrong, but in an up-to-date Tax-Brain repo I can not run the pytest suite. Here is what happens:

iMac:Tax-Brain mrh$ git log
commit 4806c4a83b50b5d1c8405f75953703658d8aa56a (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Merge: 3f5d26c 07a1717
Author: andersonfrailey <anderson.frailey@aei.org>
Date:   Mon May 13 09:50:40 2019 -0400

    Merge pull request #39 from PSLmodels/update-links

    Update COMP links in the README

...

iMac:Tax-Brain mrh$ ~/packages 
# packages in environment at /Users/mrh/anaconda3:
#
# Name                    Version                   Build  Channel
behresp                   0.7.0                    py36_0    PSLmodels
pkgbld                    0.22.0                   py36_0    PSLmodels
taxcalc                   2.1.0                    py36_0    PSLmodels

iMac:Tax-Brain mrh$ cd taxbrain

iMac:taxbrain mrh$ pytest
ImportError while loading conftest '/Users/mrh/work/PSL/Tax-Brain/taxbrain/conftest.py'.
__init__.py:2: in <module>
    from taxbrain.tbi import *
E   ModuleNotFoundError: No module named 'taxbrain.tbi'

iMac:taxbrain mrh$ cd ..
iMac:Tax-Brain mrh$ pytest taxbrain
ImportError while loading conftest '/Users/mrh/work/PSL/Tax-Brain/taxbrain/conftest.py'.
taxbrain/__init__.py:2: in <module>
    from taxbrain.tbi import *
E   ModuleNotFoundError: No module named 'taxbrain.tbi'

iMac:Tax-Brain mrh$ 

Am I doing something wrong?

andersonfrailey commented 5 years ago

@martinholmer, no, you're not doing anything wrong. We've been revamping the Tax-Brain/COMP interactions, which included deleting the TBI directory, but I forgot to remove the line referencing it from the taxbrain/__init__.py folder. The tests still passed for me locally because there were a couple of untracked files in my local copy of the tbi directory so the directory wasn't completely deleted on my machine.

Additionally, running Tax-Brain takes up more memory than travis allows so we can't set up travis to automatically run the test until that is fixed.

The issue you're running into will be solved in PR #40.

martinholmer commented 5 years ago

@andersonfrailey, Thanks for the explanation in issue #43.

andersonfrailey commented 5 years ago

This issue is resolved with the merge of #40. Closing.