Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hellseher opened this issue Nov 20, 2023 · 0 comments
Open

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

Hellseher opened this issue Nov 20, 2023 · 0 comments

Comments

@Hellseher
Copy link

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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant