Skip to content

Commit dcb771d

Browse files
jcitrinTorax team
authored andcommitted
Fix doc script combined_transport_example_test
PiperOrigin-RevId: 767535156
1 parent 1a56ecb commit dcb771d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/scripts/tests/combined_transport_example_test.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,24 @@
1313
# limitations under the License.
1414

1515
from absl.testing import absltest
16-
from torax.docs.scripts import combined_transport_example
16+
import pathlib
17+
from torax._src.config import config_loader
18+
19+
_SCRIPT_DIR = pathlib.Path(__file__).parent.parent
20+
_COMBINED_TRANSPORT_EXAMPLE_SCRIPT_PATH = (
21+
_SCRIPT_DIR / "combined_transport_example.py"
22+
)
23+
24+
_combined_transport_example_module = config_loader.import_module(
25+
_COMBINED_TRANSPORT_EXAMPLE_SCRIPT_PATH
26+
)
1727

1828

1929
class CombinedTransportExampleTest(absltest.TestCase):
2030

2131
def test_combined_transport_example_runs_without_errors(self):
22-
combined_transport_example.main([])
32+
_combined_transport_example_module["main"]([])
2333

2434

25-
if __name__ == '__main__':
35+
if __name__ == "__main__":
2636
absltest.main()

0 commit comments

Comments
 (0)