question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TST: time/tests/test_precision.py failed in pyinstaller (computed error is different depending on the order of the arguments)

See original GitHub issue

First failing log (2022-03-13): https://github.com/astropy/astropy/runs/5525474634

Last successful log (2022-03-12): https://github.com/astropy/astropy/runs/5519547613

Looks like this test was added in #10373 . Any idea how to fix, @Zac-HD or @mhvk ? 🙏

https://github.com/astropy/astropy/blob/c7b0e928e82dc7a4e099124d5223700e5bb4cfe2/astropy/time/tests/test_precision.py#L313-L315

____________________________ test_two_sum_symmetric ____________________________

    @given(floats(), floats())
>   def test_two_sum_symmetric(f1, f2):

astropy_tests/time/tests/test_precision.py:314: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f1 = -3.089785075544792e+307, f2 = 1.7976931348623157e+308

    @given(floats(), floats())
    def test_two_sum_symmetric(f1, f2):
>       np.testing.assert_equal(two_sum(f1, f2), two_sum(f2, f1))
E       AssertionError: 
E       Items are not equal:
E       item=1
E       
E        ACTUAL: nan
E        DESIRED: -9.9792015476736e+291

astropy_tests/time/tests/test_precision.py:315: AssertionError
----------------------------- Captured stdout call -----------------------------
Falsifying example: test_two_sum_symmetric(
    f1=-3.089785075544792e+307, f2=1.7976931348623157e+308,
)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Zac-HDcommented, Jul 16, 2022

I think there are two reasonable ways to fix this, though I don’t know which to prefer here:

  1. check for and handle overflow inside the code under test
  2. pass floats(min_value=1e100, max_value=1e100) (for example), so that we don’t try to test with overflow.
1reaction
pllimcommented, Mar 14, 2022

Thanks for the clarification, @Zac-HD ! I re-opened the issue and marked it as a real bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pyinstaller Error "failed to execute script " When App Clicked ...
In my case i have a main.py that have dependencies with other files. After I build that app with py installer using this...
Read more >
When Things Go Wrong — PyInstaller 5.7.0 documentation
When the Analysis step runs, it produces error and warning messages. ... The places where PyInstaller looks for the python library are different...
Read more >
Using Spec Files - PyInstaller
PyInstaller analyzes myscript.py and: Writes myscript.spec in the same folder as the script. Creates a folder build in the same folder as the...
Read more >
Using Spec Files — PyInstaller 5.7.0 documentation
It encodes the script names and most of the options you give to the pyinstaller command. The spec file is actually executable Python...
Read more >
Building the Bootloader — PyInstaller 5.7.0 documentation
test the build by ref: running (parts of) the test-suite ... python ./waf all --target-arch=32bit. If this reports an error, read the detailed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found