ScottishCovidResponse / data_pipeline_api

API to access the data pipeline
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

data_pipeline_api tests fail on Windows 10 #118

Open bobturneruk opened 3 years ago

bobturneruk commented 3 years ago
pytest --cov=data_pipeline_api
============================================================================================= test session starts ==============================================================================================
platform win32 -- Python 3.7.10, pytest-5.4.1, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\bobturner\Documents\data_pipeline_api
plugins: cov-2.8.1
collected 214 items

tests\test_data_processing_api.py ..                                                                                                                                                                      [  0%]
tests\test_file_api.py ........................                                                                                                                                                           [ 12%]
tests\test_git_info.py ...                                                                                                                                                                                [ 13%]
tests\test_metadata_store.py ......                                                                                                                                                                       [ 16%]
tests\test_overrides.py ...                                                                                                                                                                               [ 17%]
tests\test_standard_api.py EEEEEEEEEEEEEEEEEEE                                                                                                                                                            [ 26%]
tests\registry\test_access_upload.py ...........                                                                                                                                                          [ 31%]
tests\registry\test_common.py .......................................                                                                                                                                     [ 50%]
tests\registry\test_download.py ....                                                                                                                                                                      [ 51%]
tests\registry\test_downloader.py ....................................................                                                                                                                    [ 76%]
tests\registry\test_upload.py ...........                                                                                                                                                                 [ 81%]
tests\registry\test_utils.py ...                                                                                                                                                                          [ 82%]
tests\file_formats\test_object_file.py ....                                                                                                                                                               [ 84%]
tests\file_formats\test_parameter_file.py .................................                                                                                                                               [100%]

==================================================================================================== ERRORS ==================================================================================================== 
____________________________________________________________________________________ ERROR at setup of test_write_estimate _____________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_write_estimate0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_______________________________________________________________________________ ERROR at setup of test_read_estimate_as_estimate _______________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_estimate_as_estimate0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________ ERROR at setup of test_read_estimate_as_distribution _____________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_estimate_as_distribu0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_______________________________________________________________________________ ERROR at setup of test_read_estimate_as_samples ________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_estimate_as_samples0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
__________________________________________________________________________________ ERROR at setup of test_write_distribution ___________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_write_distribution0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________ ERROR at setup of test_read_distribution_as_estimate _____________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_distribution_as_esti0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
___________________________________________________________________________ ERROR at setup of test_read_distribution_as_distribution ___________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_distribution_as_dist0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________ ERROR at setup of test_read_distribution_as_samples ______________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_distribution_as_samp0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________________ ERROR at setup of test_write_samples _____________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_write_samples0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_______________________________________________________________________________ ERROR at setup of test_read_samples_as_estimate ________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_samples_as_estimate0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________ ERROR at setup of test_read_samples_as_distribution ______________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_samples_as_distribut0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
________________________________________________________________________________ ERROR at setup of test_read_samples_as_samples ________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_samples_as_samples0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
______________________________________________________________________________________ ERROR at setup of test_read_table _______________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_table0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
______________________________________________________________________________________ ERROR at setup of test_read_array _______________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_read_array0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
______________________________________________________________________________________ ERROR at setup of test_write_table ______________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_write_table0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
______________________________________________________________________________________ ERROR at setup of test_write_array ______________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_write_array0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
__________________________________________________________________________ ERROR at setup of test_access_log_contains_uri_and_git_sha __________________________________________________________________________

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_access_log_contains_uri_a0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
_____________________________________________________________________________________ ERROR at setup of test_issue_logging _____________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_issue_logging0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
______________________________________________________________________________________ ERROR at setup of test_description ______________________________________________________________________________________ 

tmp_path = WindowsPath('C:/Users/bobturner/AppData/Local/Temp/pytest-of-Bob Turner/pytest-5/test_description0')

>   ???
E   OSError: symbolic link privilege not held

c:\Users\Bob Turner\Documents\data_pipeline_api\tests\test_standard_api.py:18: OSError
=============================================================================================== warnings summary =============================================================================================== 
c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\fft\__init__.py:97
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\fft\__init__.py:97: DeprecationWarning: The module numpy.dual is deprecated.  Instead of using dual, use the functions directly from numpy or scipy.
    from numpy.dual import register_func

c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\special\orthogonal.py:81
c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\special\orthogonal.py:81
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\special\orthogonal.py:81: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,

c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\pandas\_testing.py:24
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\pandas\_testing.py:24: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    import pandas._libs.testing as _testing

tests/file_formats/test_object_file.py: 13 tests with warnings
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\pandas\core\indexes\base.py:395: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    elif issubclass(data.dtype.type, np.bool) or is_bool_dtype(data):

tests/file_formats/test_object_file.py::test_array_roundtrip
tests/file_formats/test_object_file.py::test_array_roundtrip
tests/file_formats/test_object_file.py::test_array_roundtrip
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\h5py\_hl\dataset.py:541: DeprecationWarning: Passing None into shape arguments as an alias for () is deprecated.
    arr = numpy.ndarray(selection.mshape, dtype=new_dtype)

tests/file_formats/test_parameter_file.py::test_distribution_roundtrip[categorical-parameters0]
tests/file_formats/test_parameter_file.py::test_distribution_roundtrip[multinomial-parameters8]
tests/file_formats/test_parameter_file.py::test_distribution_mean[multinomial-parameters7-mean7]
tests/file_formats/test_parameter_file.py::test_distribution_variance[categorical-parameters0-variance0]
tests/file_formats/test_parameter_file.py::test_distribution_variance[multinomial-parameters8-variance8]
  c:\users\bobturner\.conda\envs\data_pipeline_api\lib\site-packages\scipy\stats\_multivariate.py:3018: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, 
check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    n = np.array(n, dtype=np.int, copy=True)

-- Docs: https://docs.pytest.org/en/latest/warnings.html

---------- coverage: platform win32, python 3.7.10-final-0 -----------
Name                                                Stmts   Miss  Cover
-----------------------------------------------------------------------
data_pipeline_api\__init__.py                           0      0   100%
data_pipeline_api\data_processing_api.py                9      0   100%
data_pipeline_api\database_file_api.py                 30     30     0%
data_pipeline_api\file_api.py                         183      2    99%
data_pipeline_api\file_formats\object_file.py         105     11    90%
data_pipeline_api\file_formats\parameter_file.py       79     14    82%
data_pipeline_api\git_info.py                          28      8    71%
data_pipeline_api\metadata.py                          25      2    92%
data_pipeline_api\metadata_store.py                    28      0   100%
data_pipeline_api\overrides.py                         16      0   100%
data_pipeline_api\registry\__init__.py                  1      0   100%
data_pipeline_api\registry\access_upload.py           188    134    29%
data_pipeline_api\registry\common.py                  234      6    97%
data_pipeline_api\registry\download.py                 61     26    57%
data_pipeline_api\registry\downloader.py              248     44    82%
data_pipeline_api\registry\upload.py                   93     17    82%
data_pipeline_api\registry\upload_data_product.py      69     69     0%
data_pipeline_api\registry\utils.py                    14      0   100%
data_pipeline_api\standard_api.py                      99     55    44%
-----------------------------------------------------------------------
TOTAL                                                1510    418    72%

=========================================================================================== short test summary info ============================================================================================
ERROR tests/test_standard_api.py::test_write_estimate - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_estimate_as_estimate - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_estimate_as_distribution - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_estimate_as_samples - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_write_distribution - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_distribution_as_estimate - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_distribution_as_distribution - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_distribution_as_samples - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_write_samples - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_samples_as_estimate - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_samples_as_distribution - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_samples_as_samples - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_table - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_read_array - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_write_table - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_write_array - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_access_log_contains_uri_and_git_sha - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_issue_logging - OSError: symbolic link privilege not held
ERROR tests/test_standard_api.py::test_description - OSError: symbolic link privilege not held
================================================================================= 195 passed, 25 warnings, 19 errors in 8.32s ==================================================================================
DennisReddyhoff commented 3 years ago

Get ready for some classic Windows weirdness: run the terminal as admin, then try again