Commit 43eae4bc authored by Phil Jones's avatar Phil Jones

Fix some tests not actually checking anything.

parent 94191584
......@@ -8,7 +8,7 @@ from unittest import TestCase
from finesse import Model
from finesse.components import Beamsplitter, Cavity, Laser, Lens, Mirror
from finesse.exceptions import NodeException
from finesse.exceptions import BeamTraceException
from finesse.gaussian import BeamParam
from finesse.parse import get_parser
from finesse.utilities.maths import apply_ABCD
......@@ -30,8 +30,8 @@ class SimpleTracesTestCase(ModelTestCase):
self.model.L0.p1.o.q = BeamParam(q=(-1 + 1j))
# don't connect the components - try a beam trace
self.assertRaises(
RuntimeError,
callable=self.model.beam_trace
Exception,
self.model.beam_trace
)
def test_laser_to_mirror_trace(self):
......@@ -44,8 +44,8 @@ class SimpleTracesTestCase(ModelTestCase):
# first check that we get an exception when no
# beam parameters are set anywhere
self.assertRaises(
NodeException,
callable=self.model.beam_trace
BeamTraceException,
self.model.beam_trace
)
self.model.L0.p1.o.q = L0_q
......
......@@ -56,8 +56,8 @@ class PathTracingTestCase(TestCase):
# impossible path
self.assertRaises(
NetworkXNoPath,
callable=self.model.path,
args=(self.model.L0.p1.o, self.model.M.p2.i)
self.model.path,
self.model.L0.p1.o, self.model.M.p2.i
)
def test_fullpath_fabry_perot(self):
......@@ -128,8 +128,8 @@ class PathTracingTestCase(TestCase):
# impossible path because of via node
self.assertRaises(
NetworkXNoPath,
callable=self.model.path,
args=(self.model.L0.p1.o, self.model.ITM.p1.o, self.model.ETM.p2.i)
self.model.path,
self.model.L0.p1.o, self.model.ITM.p1.o, self.model.ETM.p2.i
)
def test_fullpath_simple_michelson(self):
......@@ -161,8 +161,8 @@ class PathTracingTestCase(TestCase):
# impossible path through beam splitter
self.assertRaises(
NetworkXNoPath,
callable=self.model.path,
args=(self.model.MX.p1.o, self.model.MY.p1.i)
self.model.path,
self.model.MX.p1.o, self.model.MY.p1.i
)
def test_fullpath_simple_michelson_with_via_nodes(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment