88from tidy3d .packaging import (
99 Tidy3dImportError ,
1010 check_import ,
11+ check_tidy3d_extras_licensed_feature ,
1112 supports_local_subpixel ,
1213 tidy3d_extras ,
1314 verify_packages_import ,
@@ -86,13 +87,26 @@ def get_eps():
8687 assert tidy3d_extras ["mod" ] is not None
8788 features = tidy3d_extras ["mod" ].extension ._features ()
8889 assert tidy3d_extras ["use_local_subpixel" ] == ("local_subpixel" in features )
90+ if tidy3d_extras ["use_local_subpixel" ]:
91+ check_tidy3d_extras_licensed_feature ("local_subpixel" )
8992 else :
9093 assert tidy3d_extras ["use_local_subpixel" ] is False
9194 assert tidy3d_extras ["mod" ] is None
9295
9396 get_eps ()
9497
9598
99+ def test_tidy3d_extras_broadband_feature ():
100+ import importlib
101+
102+ has_tidy3d_extras = importlib .util .find_spec ("tidy3d_extras" ) is not None
103+ print (f"has_tidy3d_extras = { has_tidy3d_extras } " )
104+ if has_tidy3d_extras :
105+ features = tidy3d_extras ["mod" ].extension ._features ()
106+ if "BroadbandPulse" in features :
107+ check_tidy3d_extras_licensed_feature ("BroadbandPulse" )
108+
109+
96110def test_supports_local_subpixel_respects_config_false ():
97111 reload_config (profile = "default" )
98112 tidy3d_extras ["mod" ] = object ()
@@ -106,9 +120,7 @@ def get_flag():
106120 return tidy3d_extras ["use_local_subpixel" ]
107121
108122 assert get_flag () is False
109- assert tidy3d_extras ["mod" ] is None
110123 finally :
111- tidy3d_extras ["mod" ] = None
112124 tidy3d_extras ["use_local_subpixel" ] = None
113125 reload_config (profile = "default" )
114126
0 commit comments