MAVENSDC / cdflib

A python module for reading NASA's Common Data Format (cdf) files
MIT License
82 stars 45 forks source link

Test failed: tests/test_astropy_epochs.py:132: AssertionError #234

Closed Hellseher closed 7 months ago

Hellseher commented 11 months ago

Hi,

version: 1.2.3

During review of CI in Guix it was found that this test failed but can't be reproduced locally.

___________________________ test_compute_cdfepoch16 ____________________________

    def test_compute_cdfepoch16():
        random_time = []
        random_time.append(randint(1709, 2292))  # Year
        random_time.append(randint(1, 12))  # Month
        random_time.append(randint(1, 28))  # Date
        random_time.append(randint(0, 23))  # Hour
        random_time.append(randint(0, 59))  # Minute
        random_time.append(randint(0, 59))  # Second
        random_time.append(randint(0, 999))  # Millisecond
        random_time.append(randint(0, 999))  # Microsecond
        random_time.append(randint(0, 999))  # Nanosecond
        random_time.append(randint(0, 999))  # Picosecond
        cdftime = cdfepoch.convert_to_astropy(cdfepoch.compute(random_time), format="cdf_epoch16")
        x = cdfepoch.breakdown(cdftime)
        i = 0
        for t in x:
>           assert t == random_time[i], f"Time {random_time} was not equal to {x}"
E           AssertionError: Time [2046, 4, 28, 19, 42, 50, 473, 1, 63, 789] was not equal to [2046    4   28   19   42   50  472  999  572  999]
E           assert 472 == 473

tests/test_astropy_epochs.py:132: AssertionError

Environment and inputs:

 guix describe
Generation 485  Nov 20 2023 22:37:51    (current)
  guix d20ece0
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: d20ece07dbb09382f361c8bbf0bcab9e83d8b73e

    guix graph -M 1 python-cdflib | awk '/label/{print $4}'
"python-cdflib@1.2.3",
"python-astropy@5.3.4",
"python-hypothesis@6.54.5",
"python-pytest@7.1.3",
"python-pytest-cov@3.0.0",
"python-pytest-remotedata@0.4.1",
"python-setuptools-scm@7.1.0",
"python-xarray@2023.6.0",
"python-attrs@21.2.0",
"python-numpy@1.23.2",
Hellseher commented 7 months ago

Closing it for now, hoping it's resolved with recent release.