epogrebnyak / data-rosstat-kep

Time series dataset of Rosstat Short-term Economic Indicators ("KEP") publication
http://www.gks.ru/wps/wcm/connect/rosstat_main/rosstat/ru/statistics/publications/catalog/doc_1140080765391
6 stars 6 forks source link

Renamed hardcoded.py -> conftest.py, added test fixtures #66

Closed alexanderlukanin13 closed 8 years ago

alexanderlukanin13 commented 8 years ago
  1. Changed tests affected by https://github.com/epogrebnyak/rosstat-kep-data/pull/63 to use pytest fixtures.
  2. hardcoded.py is renamed conftest.py - it's a standard pytest name which allows automatic discovery of test fixtures. All future fixtures should go there.
  3. Removed test_cleanup, added proper finalization by addfinalizer.
  4. Removed if __name__ == '__main__' part is hardcoded.py - looks like an obsolete debug code.
  5. Moved get_test_flat_rows logic from test_stream.py because it doesn't belong there, it's only used in test_database.py.

If you have suggestions regarding pull request, please don't close it, just add a comment.

epogrebnyak commented 8 years ago

I'm not very familar with fixtures, and it will take some time to familirize with this new code - risk that I will not be able to maintain these tests. Merging this pull, but with hesitation.