Skip to content

Commit d0cbdcf

Browse files
committed
importskip torch
1 parent d84c5c9 commit d0cbdcf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_TiO2.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
import os
66
from shutil import copytree, rmtree
77

8-
import elli
98
import numpy as np
10-
from elli.fitting import ParamsHist
9+
import pytest
1110
from pytest import fixture
1211

12+
import elli
13+
from elli.fitting import ParamsHist
14+
1315

1416
@fixture
1517
def datadir(tmpdir, request):
@@ -135,6 +137,8 @@ def test_solver4x4_expm(self, si_dispersion, meas_data):
135137

136138
def test_solver4x4_expm_torch(self, si_dispersion, meas_data):
137139
"""The solver4x4 with pytorch propagator is within chi square accuracy"""
140+
141+
_ = pytest.importorskip("torch")
138142
sim_data = (
139143
elli.Structure(elli.AIR, self.Layer, si_dispersion)
140144
.evaluate(

0 commit comments

Comments
 (0)