flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
455 stars 116 forks source link

Fix test_backend.py when PyTorch is installed #10

Closed per-gron closed 3 years ago

per-gron commented 3 years ago

For me if PyTorch is installed, without this patch the test fails with

Traceback (most recent call last):
  File ".../test_backend.py", line 20, in <module>
    @pytest.mark.skipif(skip_test_backend, reason="PyTorch is not installed.")
NameError: name 'skip_test_backend' is not defined
flaport commented 3 years ago

Good catch! Thanks 🙂