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

Testing/pytest: test_label_csv.py must not depend on fixtures, must test labelling only, import should be covered in different tests #80

Closed epogrebnyak closed 8 years ago

epogrebnyak commented 8 years ago

test_label_csv.py does not its own job, it is actuall a test of import of conftest.py data up to labelled rows in essence it shoulds do only something like https://github.com/epogrebnyak/rosstat-kep-data/blob/master/kep/test/pytest/_package/test_mwe.py#L146-L147 the rest of file is about importing data, this is tested elsewhere they have a useful function that checks all files are present

def test_import(raw_data_file, spec_file, cfg_file):
    assert os.path.exists(raw_data_file)
    assert os.path.exists(spec_file)
    assert os.path.exists(cfg_file)