Skip to content

Commit

Permalink
Updating test dependencies in geos ats
Browse files Browse the repository at this point in the history
  • Loading branch information
cssherman committed Sep 4, 2024
1 parent c7fe886 commit f530758
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions geos-ats/src/geos/ats/test_case.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ats # type: ignore[import]
import ats # type: ignore[import]
import os
import shutil
import logging
Expand Down Expand Up @@ -319,7 +319,7 @@ def testCreate( self ):
priority = 1

# Setup a new test group
atsTest = None
parent_test = None
ats.tests.AtsTest.newGroup( priority=priority, path=self.path )
for stepnum, step in enumerate( self.steps ):
np = getattr( step.p, "np", 1 )
Expand All @@ -329,10 +329,10 @@ def testCreate( self ):
label = "%s_%d_%s" % ( self.name, stepnum + 1, step.label() )

# call either 'test' or 'testif'
if atsTest is None:
if parent_test is None:
func = lambda *a, **k: test( *a, **k )
else:
func = lambda *a, **k: testif( atsTest, *a, **k )
func = lambda *a, **k: testif( parent_test, *a, **k )

# Set the time limit
kw = {}
Expand All @@ -359,6 +359,11 @@ def testCreate( self ):
if self.last_status == PASSED:
atsTest.status = SKIPPED

# Set the parent test
# Note: do not make tests dependent on the result of curvecheck
if step.label() != 'curvecheck':
parent_test = atsTest

# End the group
ats.tests.AtsTest.endGroup()

Expand Down

0 comments on commit f530758

Please sign in to comment.