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

Broken ext and ticket tests #1103

Open
4 tasks
LourensVeen opened this issue Jan 21, 2025 · 0 comments
Open
4 tasks

Broken ext and ticket tests #1103

LourensVeen opened this issue Jan 21, 2025 · 0 comments
Labels

Comments

@LourensVeen
Copy link
Collaborator

LourensVeen commented Jan 21, 2025

Describe the bug
Several of the ext_tests and ticket_tests are currently failing. They've been disabled for now, but should really be fixed:

  • test_jobserver (crashes the entire pytest run)
  • TestLimepy (LimePy itself is broken, see LimePy broken #1102)
  • TestHeatingWind::test_supernova and test_supernova_manuel (different result than expected)
  • TestsForIssue123 (crashes)

Additionally, several warnings are generated when running the ext tests:

tests/ext_tests/test_galactic_potentials.py::TestPowerLawCutoff_profile::test2
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/units/quantities.py:146: RuntimeWarning: divide by zero encountered in divide
    operator.__truediv__(self.number, other.number),

tests/ext_tests/test_galactic_potentials.py::TestPowerLawCutoff_profile::test2
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/units/quantities.py:135: RuntimeWarning: invalid value encountered in multiply
    self.number * other.number, (self.unit * other.unit).to_simple_form()

tests/ext_tests/test_galactic_potentials.py::TestPowerLawCutoff_profile::test2
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/units/quantities.py:141: RuntimeWarning: divide by zero encountered in power
    return new_quantity(self.number**other, self.unit**other)

tests/ext_tests/test_isotropic_cloud.py::TestSphericalIsotropicCloud::test2
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/ext/orbital_elements.py:435: UserWarning: orbital_elements_from_binary is deprecated, use orbital_elements instead
    warnings.warn(

tests/ext_tests/test_orbital_elements.py: 11 warnings
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/ext/orbital_elements.py:344: UserWarning: new_binary_from_orbital_elements is deprecated, use generate_binaries instead
    warnings.warn(

tests/ext_tests/test_orbital_elements.py::KeplerTests::test6
tests/ext_tests/test_orbital_elements.py::KeplerTests::test7
tests/ext_tests/test_orbital_elements.py::KeplerTests::test8
tests/ext_tests/test_orbital_elements.py::KeplerTests::test9
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/ext/orbital_elements.py:689: UserWarning: orbital_elements_for_rel_posvel_arrays is deprecated, use orbital_elements instead
    warnings.warn(

tests/ext_tests/test_static_potentials.py::TestGalacticCenterPotential::test1
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/ext/static_potentials.py:184: RuntimeWarning: divide by zero encountered in log
    log_m_over_mb = numpy.log(mass_above/mass_below) * numpy.log(r/radius_below) / numpy.log(radius_above/radius_below)

tests/ext_tests/test_static_potentials.py::TestGalacticCenterPotential::test1
  /home/lourens/NLeSC/projects/ReDiTSAp/software/amuse/src/amuse/ext/static_potentials.py:184: RuntimeWarning: invalid value encountered in scalar divide
    log_m_over_mb = numpy.log(mass_above/mass_below) * numpy.log(r/radius_below) / numpy.log(radius_above/radius_below)

To Reproduce
With the new setup system, edit ./setup to remove the desired test from BAD_EXT_TESTS, then run ./setup test amuse-ext. The warnings are always printed.

Expected behavior
The tests are expected to pass.

Additional context
I've disabled these tests for now, so that we can run this in the CI and at least detect when some code change causes other tests to fail. It would be better to get them fixed though.

LourensVeen added a commit to LourensVeen/amuse that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant