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

Three unit tests failed. #49

Closed
yufeizhu600 opened this issue Feb 3, 2021 · 2 comments
Closed

Three unit tests failed. #49

yufeizhu600 opened this issue Feb 3, 2021 · 2 comments

Comments

@yufeizhu600
Copy link
Contributor

Code Sample, a minimal, complete, and verifiable piece of code


❯ git clone https://github.com/pytroll/pytroll-schedule.git

❯ cd pytroll-schedule

❯ pip install .

❯ cd trollsched/tests

❯ python -m unittest

Problem description

I have cloned and installed directly from github master branch and then ran unit tests as above, found 3 unit tests are not passed.

Expected Output

all tests passed.

Actual Result, Traceback if applicable

❯ python -m unittest
Instrument is a sequence Assume avhrr...
Instrument is a sequence! Assume viirs...
.F....FF.../Users/yufeizhu/pytroll/pytroll-schedule/trollsched/tests/test_schedule.py:96: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(
....../Users/yufeizhu/pytroll/pytroll-schedule/trollsched/tests/test_spherical.py:188: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(np.rad2deg(lat), 5.0575148968282093)
.....................
======================================================================
FAIL: test_generate_metno_xml (test_satpass.TestPassList)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/yufeizhu/pytroll/pytroll-schedule/trollsched/tests/test_satpass.py", line 363, in test_generate_metno_xml
    self.assertEqual(ET.tostring(root).decode("utf-8"), orig)
AssertionError: '<acq[19 chars]pass satellite="FENGYUN 3D" aos="2019010501014[253 chars]ule>' != '<acq[19 chars]pass aos="20190105010145" asimuth-at-aos="18.5[253 chars]ule>'
Diff is 659 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_get_metopa_passes (test_schedule.TestAll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/yufeizhu/miniconda3/envs/py3_satpy0.24/lib/python3.8/unittest/mock.py", line 1325, in patched
    return func(*newargs, **newkeywargs)
  File "/Users/yufeizhu/pytroll/pytroll-schedule/trollsched/tests/test_schedule.py", line 408, in test_get_metopa_passes
    self.assertEqual(metopa_passes[0].seconds(), 462.466119)
AssertionError: 487.512589 != 462.466119

======================================================================
FAIL: test_get_next_passes_viirs (test_schedule.TestAll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/yufeizhu/miniconda3/envs/py3_satpy0.24/lib/python3.8/unittest/mock.py", line 1325, in patched
    return func(*newargs, **newkeywargs)
  File "/Users/yufeizhu/pytroll/pytroll-schedule/trollsched/tests/test_schedule.py", line 313, in test_get_next_passes_viirs
    self.assertAlmostEqual(dt_.seconds, 0)
AssertionError: 6062 != 0 within 7 places (6062 difference)

----------------------------------------------------------------------
Ran 38 tests in 55.649s

FAILED (failures=3)

Versions of Python, package at hand and relevant dependencies

Python 3.8.6
pytroll-schedule master branch

Thank you for reporting an issue !

@yufeizhu600
Copy link
Contributor Author

yufeizhu600 commented Feb 22, 2021

I think I have fixed the test_generate_metno_xml case in PR#51, which is just the order of the return values has been changed. @TAlonglong , could you please take a look at my fix.
@adybbroe @mraspaud , Could you please take a look at those failed test cases.test_get_metopa_passes and test_get_next_passes_viirs .

@pnuu
Copy link
Member

pnuu commented May 10, 2021

This was closed with #51

@pnuu pnuu closed this as completed May 10, 2021
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

2 participants