Skip to content

test_create_and_times fails on Mac OSX #7

@maxlklaxl

Description

@maxlklaxl

MacOS Sierra (10.12.6)
miniconda3 conda 4.5.11

conda install onpencv
pip install imgstore
# packages in environment at /Users/maxhofbauer/miniconda3/envs/newimgstore:
#
# Name                    Version                   Build  Channel
atomicwrites              1.2.1                      py_0    conda-forge
attrs                     18.2.0                     py_0    conda-forge
blas                      1.1                    openblas    conda-forge
bzip2                     1.0.6                         1    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
cairo                     1.14.12              h276e583_5    conda-forge
certifi                   2018.8.24             py36_1001    conda-forge
ffmpeg                    4.0.2                ha0c5888_1    conda-forge
fontconfig                2.13.1               hce039c3_0    conda-forge
freetype                  2.9.1                h6debe1e_4    conda-forge
gettext                   0.19.8.1             h1f1d5ed_1    conda-forge
giflib                    5.1.4                h470a237_1    conda-forge
glib                      2.56.2               h464dc38_0    conda-forge
gmp                       6.1.2                hfc679d8_0    conda-forge
gnutls                    3.5.19               h2a4e5f8_1    conda-forge
graphite2                 1.3.12               h7d4d677_1    conda-forge
harfbuzz                  1.9.0                hee26f79_1    conda-forge
hdf5                      1.10.2               hc401514_2    conda-forge
icu                       58.2                 hfc679d8_0    conda-forge
imgstore                  0.2.0                     <pip>
intel-openmp              2019.0                      118  
jasper                    1.900.1              hff1ad4c_5    conda-forge
jpeg                      9c                   h470a237_1    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libgfortran               3.0.0                         1    conda-forge
libiconv                  1.15                 h470a237_3    conda-forge
libpng                    1.6.35               ha92aebf_2    conda-forge
libtiff                   4.0.9                he6b73bb_2    conda-forge
libwebp                   0.5.2                         7    conda-forge
libxml2                   2.9.8                h422b904_5    conda-forge
mkl                       2017.0.4             h1fae6ae_0  
more-itertools            4.3.0                 py36_1000    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
nettle                    3.3                           0    conda-forge
numpy                     1.15.2          py36_blas_openblashd3ea46f_1  [blas_openblas]  conda-forge
openblas                  0.2.20                        8    conda-forge
opencv                    3.4.3           py36_blas_openblash553dce0_200  [blas_openblas]  conda-forge
openh264                  1.7.0                         0    conda-forge
openssl                   1.0.2p               h470a237_0    conda-forge
pandas                    0.23.4                    <pip>
pcre                      8.41                 hfc679d8_3    conda-forge
pip                       18.1                  py36_1000    conda-forge
pixman                    0.34.0               h470a237_3    conda-forge
pluggy                    0.7.1                      py_0    conda-forge
py                        1.6.0                      py_0    conda-forge
pytest                    3.8.2                 py36_1000    conda-forge
python                    3.6.6                h5001a0f_0    conda-forge
python-dateutil           2.7.3                     <pip>
pytz                      2018.5                    <pip>
PyYAML                    3.13                      <pip>
readline                  7.0                  haf1bffa_1    conda-forge
setuptools                40.4.3                   py36_0    conda-forge
six                       1.11.0                    <pip>
six                       1.11.0                py36_1001    conda-forge
sqlite                    3.25.2               hb1c47c0_0    conda-forge
tk                        8.6.8                ha92aebf_0    conda-forge
tzlocal                   1.5.1                     <pip>
wheel                     0.32.1                   py36_0    conda-forge
x264                      1!152.20180717       h470a237_1    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge
(newimgstore) lb-max-mac:~ maxhofbauer$ imgstore-test
========================================================================================= test session starts ==========================================================================================
platform darwin -- Python 3.6.6, pytest-3.8.2, py-1.6.0, pluggy-0.7.1 -- /Users/maxhofbauer/miniconda3/envs/newimgstore/bin/python
cachedir: .pytest_cache
rootdir: /Users/maxhofbauer, inifile:
collected 66 items                                                                                                                                                                                     

miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[png] PASSED                                                                                    [  1%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[bmp] PASSED                                                                                    [  3%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[pgm] PASSED                                                                                    [  4%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[tif] PASSED                                                                                    [  6%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[ppm] PASSED                                                                                    [  7%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[jpg] PASSED                                                                                    [  9%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[npy] PASSED                                                                                    [ 10%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[mjpeg/avi] PASSED                                                                              [ 12%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[h264/mkv] PASSED                                                                               [ 13%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_all[avc1/mp4] PASSED                                                                               [ 15%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[b&w-mjpeg] PASSED                                                                       [ 16%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[b&w-npy] PASSED                                                                         [ 18%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[b&w-h264/mkv] PASSED                                                                    [ 19%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[b&w-avc1/mp4] PASSED                                                                    [ 21%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[color-mjpeg] PASSED                                                                     [ 22%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[color-npy] PASSED                                                                       [ 24%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[color-h264/mkv] PASSED                                                                  [ 25%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_outoforder[color-avc1/mp4] PASSED                                                                  [ 27%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_create_and_times FAILED                                                                            [ 28%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_testencode_decode PASSED                                                                           [ 30%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_extract_only[npy] PASSED                                                                           [ 31%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_extract_only[mjpeg] PASSED                                                                         [ 33%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_extract_only[h264/mkv] PASSED                                                                      [ 34%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_extract_only[avc1/mp4] PASSED                                                                      [ 36%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_extract_only_motif PASSED                                                                          [ 37%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_manual_assembly PASSED                                                                             [ 39%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_store_frame_metadata PASSED                                                                        [ 40%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoimgstore_mp4[True] PASSED                                                                     [ 42%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoimgstore_mp4[False] PASSED                                                                    [ 43%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_reindex_to_zero[2] PASSED                                                                          [ 45%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_reindex_to_zero[3] PASSED                                                                          [ 46%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_reindex_to_zero[10] PASSED                                                                         [ 48%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_reindex_impossible PASSED                                                                          [ 50%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-7-True] PASSED                                                                      [ 51%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-7-False] PASSED                                                                     [ 53%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-20-True] PASSED                                                                     [ 54%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-20-False] PASSED                                                                    [ 56%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-100-True] PASSED                                                                    [ 57%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[npy-100-False] PASSED                                                                   [ 59%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-7-True] PASSED                                                                    [ 60%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-7-False] PASSED                                                                   [ 62%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-20-True] PASSED                                                                   [ 63%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-20-False] PASSED                                                                  [ 65%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-100-True] PASSED                                                                  [ 66%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[mjpeg-100-False] PASSED                                                                 [ 68%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-7-True] PASSED                                                                 [ 69%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-7-False] PASSED                                                                [ 71%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-20-True] PASSED                                                                [ 72%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-20-False] PASSED                                                               [ 74%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-100-True] PASSED                                                               [ 75%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[h264/mkv-100-False] PASSED                                                              [ 77%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-7-True] PASSED                                                                 [ 78%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-7-False] PASSED                                                                [ 80%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-20-True] PASSED                                                                [ 81%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-20-False] PASSED                                                               [ 83%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-100-True] PASSED                                                               [ 84%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_seek_types[avc1/mp4-100-False] PASSED                                                              [ 86%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_always_supported PASSED                                                                            [ 87%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[True-mjpeg/avi] PASSED                                                         [ 89%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[True-h264/mkv] PASSED                                                          [ 90%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[True-avc1/mp4] PASSED                                                          [ 92%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[False-mjpeg/avi] PASSED                                                        [ 93%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[False-h264/mkv] PASSED                                                         [ 95%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_videoseek_extensive[False-avc1/mp4] PASSED                                                         [ 96%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py::test_new_apis PASSED                                                                                    [ 98%]
miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_util.py::test_codec PASSED                                                                                           [100%]

=============================================================================================== FAILURES ===============================================================================================
________________________________________________________________________________________ test_create_and_times _________________________________________________________________________________________

loglevel_debug = None, tmpdir = local('/private/var/folders/cf/trh_djmn0s9fd4s007h5q2w40000gn/T/pytest-of-maxhofbauer/pytest-1/test_create_and_times0')

    def test_create_and_times(loglevel_debug, tmpdir):
        import pytz
    
        tdir = tmpdir.strpath
    
        # check we always get a UTC timesone
        # does not have created_utc in metadata
        d = stores.new_for_filename(os.path.join(TEST_DATA_DIR, 'store_mp4', 'metadata.yaml'))
        c_utc, tz = d.created
        assert c_utc.tzinfo is not None
        assert c_utc.tzinfo == pytz.utc
    
        store, _ = new_framecode_store(dest=tdir, frame0=0, nframes=1)
        assert store.uuid is not None
    
        store2 = stores.new_for_filename(store.full_path)
        assert store2.uuid == store.uuid
>       assert store2.created == store.created
E       AssertionError: assert (datetime.dat...+1:05:00 STD>) == (datetime.date...+1:05:00 STD>)
E         At index 0 diff: datetime.datetime(2018, 10, 8, 9, 28, 57, 226400, tzinfo=<UTC>) != datetime.datetime(2018, 10, 8, 11, 28, 57, 226400, tzinfo=<UTC>)
E         Full diff:
E         - (datetime.datetime(2018, 10, 8, 9, 28, 57, 226400, tzinfo=<UTC>),
E         ?                                 ^
E         + (datetime.datetime(2018, 10, 8, 11, 28, 57, 226400, tzinfo=<UTC>),
E         ?                                 ^^
E         <DstTzInfo 'Europe/Vienna' LMT+1:05:00 STD>)

miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/tests/test_imgstore.py:289: AssertionError
=========================================================================================== warnings summary ===========================================================================================
/Users/maxhofbauer/miniconda3/envs/newimgstore/lib/python3.6/site-packages/imgstore/stores.py:837: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  self._log.warn("store created with color image shape but using grayscale 'pgm' format")

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================================================================== 1 failed, 65 passed, 1 warnings in 69.05 seconds ===========================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions