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

Fix warnings in frontend tests #1223

Open
tylerflex opened this issue Oct 30, 2023 · 0 comments
Open

Fix warnings in frontend tests #1223

tylerflex opened this issue Oct 30, 2023 · 0 comments
Assignees

Comments

@tylerflex
Copy link
Collaborator

The front end tests trigger the following warnings in scene and mode solver

tests/test_components/test_scene.py::test_plot_1d_scene
tests/test_components/test_simulation.py::test_plot_1d_sim
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/components/scene.py:478: UserWarning: Attempting to set identical low and high xlims makes transformation singular; automatically expanding.
    ax.set_xlim(hlim)

tests/test_plugins/test_mode_solver.py::test_mode_solver_nan_pol_fraction
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/plugins/mode/solver.py:464: RuntimeWarning: divide by zero encountered in divide
    Hx = h_field[:N, :] / (1j * neff - keff)

tests/test_plugins/test_mode_solver.py::test_mode_solver_nan_pol_fraction
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/plugins/mode/solver.py:464: RuntimeWarning: invalid value encountered in divide
    Hx = h_field[:N, :] / (1j * neff - keff)

tests/test_plugins/test_mode_solver.py::test_mode_solver_nan_pol_fraction
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/plugins/mode/solver.py:465: RuntimeWarning: divide by zero encountered in divide
    Hy = h_field[N:, :] / (1j * neff - keff)

tests/test_plugins/test_mode_solver.py::test_mode_solver_nan_pol_fraction
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/plugins/mode/solver.py:465: RuntimeWarning: invalid value encountered in divide
    Hy = h_field[N:, :] / (1j * neff - keff)

tests/test_plugins/test_mode_solver.py::test_mode_solver_nan_pol_fraction
  /Users/twhughes/Documents/Flexcompute/tidy3d-docs/tidy3d/tidy3d/plugins/mode/solver.py:474: RuntimeWarning: invalid value encountered in multiply
    H *= -1j / ETA_0

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

it would be good to fix these before this list grows

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

3 participants