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

Some snapshot tests are failing (EIA API and workflows) #21

Open
jdechalendar opened this issue Jan 1, 2024 · 0 comments
Open

Some snapshot tests are failing (EIA API and workflows) #21

jdechalendar opened this issue Jan 1, 2024 · 0 comments

Comments

@jdechalendar
Copy link
Owner

jdechalendar commented Jan 1, 2024

I noticed these failures when working on #20.

  • For the three EIA API tests, these look like minor changes of the API, but could also be due to the way the snapshot is being printed. The order of the keys in the json response seems to have changed from when I made the snapshots. Better standardizing the json output could also be the fix if the only difference is the ordering of the keys.
  • For the workflow test, this does not fail on the Ubuntu machine I use, but does fail on the OSX one. The failure seems to be due to float precision. A probable fix is to control the precision when printing to the snapshot.

Summary section of pytest output follows.

===================================== test session starts ======================================
platform darwin -- Python 3.10.13, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/jacquesdechalendar/code/gridemissions
plugins: anyio-3.6.1, syrupy-4.0.1, cov-4.0.0, dash-2.10.0
collected 57 items

test/test_api.py ....                                                                    [  7%]
test/test_configure.py ..                                                                [ 10%]
test/test_eia_api.py ..........                                                          [ 28%]
test/test_eia_api_v2.py .........                                                        [ 43%]
test/test_eia_api_v2_snapshots.py FF..                                                   [ 50%]
test/test_eia_api_v2_snapshots_detailed.py F                                             [ 52%]
test/test_eia_bulk_grid_monitor.py ..                                                    [ 56%]
test/test_graphdata.py ...................                                               [ 89%]
test/test_graphdata2.py .                                                                [ 91%]
test/test_workflows.py ....F                                                             [100%]
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