Skip to content

Instantly share code, notes, and snippets.

@guillett
Created December 10, 2018 13:27
Show Gist options
  • Save guillett/4bb76f4ab8773c8f0309f833ae194648 to your computer and use it in GitHub Desktop.
Save guillett/4bb76f4ab8773c8f0309f833ae194648 to your computer and use it in GitHub Desktop.
Erreur de lancement des tests
(venv-off) ➜ openfisca-france git:(ppa-new-vars) ✗ openfisca-run-test --country-package openfisca_france tests/formulas/ppa_2018.yaml
No handlers could be found for logger "openfisca_core.parameters"
/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/openfisca_core/scripts/run_test.py:31: Warning: The 'openfisca-run-test' command has been deprecated in favor of 'openfisca test' since version 25.0, and will be removed in the future.
Warning
E
======================================================================
ERROR: test suite
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/nose/suite.py", line 209, in run
self.setUp()
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/nose/suite.py", line 270, in setUp
if not self:
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/nose/suite.py", line 85, in __nonzero__
test = self.test_generator.next()
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/openfisca_core/tools/test_runner.py", line 75, in generate_tests
for test in _generate_tests_from_file(tax_benefit_system, path, options):
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/openfisca_core/tools/test_runner.py", line 126, in _generate_tests_from_file
for test_index, (simulation, test) in enumerate(tests, 1):
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/openfisca_core/tools/test_runner.py", line 184, in _parse_test_file
yield _parse_test(tax_benefit_system, test, options, yaml_path)
File "/home/thomas/repos/venv-off/local/lib/python2.7/site-packages/openfisca_core/tools/test_runner.py", line 211, in _parse_test
name = test.get('name', '')
AttributeError: 'CommentedSeq' object has no attribute 'get'
----------------------------------------------------------------------
Ran 0 tests in 0.151s
FAILED (errors=1)
(venv-off) ➜ openfisca-france git:(ppa-new-vars) ✗ pip list
Package Version Location
---------------------------------- --------- -------------------------------------------------------
Babel 2.6.0
backports.shutil-get-terminal-size 1.0.0
Biryani 0.10.9
certifi 2018.4.16
chardet 3.0.4
click 6.7
configparser 3.5.0
decorator 4.3.0
dpath 1.4.0
enum34 1.1.6
flake8 3.4.1
Flask 0.12
Flask-Cors 3.0.2
future 0.16.0
gunicorn 19.8.1
idna 2.7
ipython 5.7.0
ipython-genutils 0.2.0
isodate 0.6.0
itsdangerous 0.24
Jinja2 2.10
MarkupSafe 1.0
mccabe 0.6.1
nose 1.3.7
numexpr 2.6.8
numpy 1.14.4
OpenFisca-Core 25.1.0 /home/thomas/repos/venv-off/lib/python2.7/site-packages
OpenFisca-France 32.2.1 /home/thomas/repos/openfisca-france
pandas 0.23.4
pathlib2 2.3.2
pathspec 0.5.6
pexpect 4.6.0
pickleshare 0.7.4
pip 18.0
pkg-resources 0.0.0
prompt-toolkit 1.0.15
psutil 5.4.6
ptyprocess 0.5.2
pycodestyle 2.3.1
pyflakes 1.5.0
Pygments 2.2.0
python-dateutil 2.7.5
pytz 2018.4
PyYAML 3.12
requests 2.19.0
ruamel.ordereddict 0.4.13
ruamel.yaml 0.15.61
scandir 1.7
scipy 1.1.0
setuptools 39.2.0
simplegeneric 0.8.1
six 1.11.0
sortedcontainers 1.5.9
traitlets 4.3.2
urllib3 1.23
wcwidth 0.1.7
Werkzeug 0.14.1
wheel 0.31.1
yamllint 1.11.1
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@bonjourmauko
Copy link

Python 3:

hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > python --version
Python 3.7.0
hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > openfisca test --country-package openfisca_france tests/formulas/ppa_2018.yaml
............
----------------------------------------------------------------------
Ran 12 tests in 11.763s

OK
hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > pip list
Package           Version    Location                                               
----------------- ---------- -------------------------------------------------------
atomicwrites      1.2.1      
attrs             18.2.0     
autopep8          1.4        
Babel             2.6.0      
Biryani           0.10.8     
bleach            3.0.2      
certifi           2018.11.29 
chardet           3.0.4      
Click             7.0        
docutils          0.14       
dpath             1.4.0      
enum34            1.1.6      
flake8            3.5.0      
flake8-print      3.1.0      
Flask             1.0.2      
Flask-Cors        3.0.2      
future            0.17.1     
gunicorn          19.9.0     
idna              2.7        
isodate           0.6.0      
itsdangerous      1.1.0      
Jinja2            2.10       
MarkupSafe        1.1.0      
mccabe            0.6.1      
more-itertools    4.3.0      
nose              1.3.7      
numexpr           2.6.8      
numpy             1.15.4     
OpenFisca-Core    25.1.0     
OpenFisca-France  32.2.1     /Users/hyperion/Sites/dinsic/openfisca/openfisca-france
pathspec          0.5.9      
pip               18.1       
pkginfo           1.4.2      
pluggy            0.8.0      
psutil            5.4.6      
py                1.7.0      
pycodestyle       2.3.1      
pyflakes          1.6.0      
Pygments          2.3.0      
pytest            3.10.1     
pytz              2018.7     
PyYAML            3.13       
readme-renderer   24.0       
requests          2.20.1     
requests-toolbelt 0.8.0      
ruamel.yaml       0.15.81    
scipy             1.1.0      
setuptools        39.0.1     
six               1.12.0     
sortedcontainers  1.5.9      
tqdm              4.28.1     
twine             1.12.1     
urllib3           1.24.1     
webencodings      0.5.1      
Werkzeug          0.14.1     
wheel             0.32.3     
yamllint          1.11.1     

Python 2:

hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > python --version
Python 2.7.15
hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > openfisca test --country-package openfisca_france tests/formulas/ppa_2018.yaml
............
----------------------------------------------------------------------
Ran 12 tests in 11.677s

OK
hyperion@diotimac:~/Sites/dinsic/openfisca/openfisca-france[master] > pip list
Package            Version    Location                                               
------------------ ---------- -------------------------------------------------------
atomicwrites       1.2.1      
attrs              18.2.0     
autopep8           1.4        
Babel              2.6.0      
Biryani            0.10.8     
bleach             3.0.2      
certifi            2018.11.29 
chardet            3.0.4      
Click              7.0        
configparser       3.5.0      
docutils           0.14       
dpath              1.4.0      
enum34             1.1.6      
flake8             3.5.0      
flake8-print       3.1.0      
Flask              1.0.2      
Flask-Cors         3.0.2      
funcsigs           1.0.2      
future             0.17.1     
gunicorn           19.9.0     
idna               2.7        
isodate            0.6.0      
itsdangerous       1.1.0      
Jinja2             2.10       
MarkupSafe         1.1.0      
mccabe             0.6.1      
more-itertools     4.3.0      
nose               1.3.7      
numexpr            2.6.8      
numpy              1.15.4     
OpenFisca-Core     25.1.0     
OpenFisca-France   32.2.1     /Users/hyperion/Sites/dinsic/openfisca/openfisca-france
pathlib2           2.3.3      
pathspec           0.5.9      
pip                18.1       
pkginfo            1.4.2      
pluggy             0.8.0      
psutil             5.4.6      
py                 1.7.0      
pycodestyle        2.3.1      
pyflakes           1.6.0      
Pygments           2.3.0      
pytest             3.10.1     
pytz               2018.7     
PyYAML             3.13       
readme-renderer    24.0       
requests           2.20.1     
requests-toolbelt  0.8.0      
ruamel.ordereddict 0.4.13     
ruamel.yaml        0.15.81    
scandir            1.9.0      
scipy              1.1.0      
setuptools         40.4.3     
six                1.12.0     
sortedcontainers   1.5.9      
tqdm               4.28.1     
twine              1.12.1     
urllib3            1.24.1     
webencodings       0.5.1      
Werkzeug           0.14.1     
wheel              0.32.3     
yamllint           1.11.1     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment