Skip to content

Commit 139140e

Browse files
committed
Remove include guard for dg.geo
Now it is always included It is not possible to install without any more ...
1 parent c6b546e commit 139140e

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

pyfeltor/dg/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@
55
from .enums import bc, direction, inverse_bc, inverse_dir
66
from .grid import Grid
77
from .evaluation import evaluate, integrate
8-
try:
9-
from . import geo
10-
except ImportError:
11-
pass
8+
from . import geo

tests/guenter_params.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/test_geometries.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,8 @@
44
from pyfeltor import dg
55
import pytest_datadir
66

7-
geo_loaded = True
8-
try:
9-
from pyfeltor.dg import geo
10-
except ImportError:
11-
geo_loaded = False
12-
13-
14-
# Run with pytest-3 -s . to see stdout output
15-
def geo_exists():
16-
if not geo_loaded:
17-
print( "dg.geo not compiled")
18-
return False
19-
return True
20-
217

228
def test_polynomial():
23-
if not geo_exists(): return
249
c = np.array( [1,2,3,4])
2510
params = {"R_0" : 400, "inverseaspectratio" : 20, "elongation" : 1, "triangularity" : 1,
2611
"PP" : 1, "PI" : 1, "description" : "standardX", "M" : 2, "N" : 2, "c" : c.tolist()}
@@ -36,7 +21,6 @@ def test_polynomial():
3621

3722

3823
def test_make_field(datadir):
39-
if not geo_exists(): return
4024
with open (datadir / "geometry_params_Xpoint.json", "r") as f:
4125
magparams = json.load(f)
4226
mag = dg.geo.createMagneticField( magparams)
@@ -55,7 +39,6 @@ def test_make_field(datadir):
5539

5640

5741
def test_q_profile(datadir):
58-
if not geo_exists(): return
5942
with open (datadir / "enrx_tcv.json", "r") as f:
6043
magparams = json.load(f)
6144
mag = dg.geo.createMagneticField(magparams)
@@ -68,7 +51,6 @@ def test_q_profile(datadir):
6851
print(qfunctor(psi_values))
6952

7053
def test_sheath(datadir):
71-
if not geo_exists(): return
7254
with open (datadir / "enrx_tcv.json", "r") as f:
7355
magparams = json.load(f)
7456
mag = dg.geo.createMagneticField(magparams)

0 commit comments

Comments
 (0)