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

Understand why some tests fail on Travis CI but pass locally #397

Open
csparpa opened this issue Apr 23, 2022 · 0 comments
Open

Understand why some tests fail on Travis CI but pass locally #397

csparpa opened this issue Apr 23, 2022 · 0 comments
Milestone

Comments

@csparpa
Copy link
Owner

csparpa commented Apr 23, 2022

Unit tests failing on Travis CI: https://app.travis-ci.com/github/csparpa/pyowm/builds/249771377

Branch: develop
Module: tests.unit.airpollutionapi30.test_airpollution_client.TestAirPollutionHttpClient

# extract from Travis CI build log

======================================================================
FAIL: test_get_coi (tests.unit.airpollutionapi30.test_airpollution_client.TestAirPollutionHttpClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/[secure]/pyowm/tests/unit/airpollutionapi30/test_airpollution_client.py", line 42, in test_get_coi
    self.assertEqual(expected_url, result)
AssertionError: 'co/43.75,8.25/current.json' != {'time': '2016-10-01T13:07:01Z', 'locatio[342 chars]07}]}
======================================================================
FAIL: test_get_o3 (tests.unit.airpollutionapi30.test_airpollution_client.TestAirPollutionHttpClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/[secure]/pyowm/tests/unit/airpollutionapi30/test_airpollution_client.py", line 93, in test_get_o3
    self.assertEqual(expected_url, result)
AssertionError: 'o3/43.75,8.25/current.json' != {'time': '2016-10-06T13:32:53Z', 'locatio[68 chars]0781}

The same tests pass locally, with all Python versions

It looks like mocking is not working properly on Travis CI and this happens only on that Python test module.

@csparpa csparpa added this to the 3.4.0 milestone Apr 23, 2022
@csparpa csparpa modified the milestones: 3.4.0, 4.0.0 Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant