Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
egede committed May 14, 2024
1 parent 613f2c9 commit 62bdef1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ganga/GangaCore/test/GPI/TestLocalCleanenv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
from GangaCore.testlib.GangaUnitTest import GangaUnitTest


class TestLocalCleanenv(GangaUnitTest):
def testLocalCleanenv(self):
from GangaCore.GPI import Job
from GangaTest.Framework.utils import sleep_until_completed, file_contains

envname = 'LocalCleanenv_sjt5p'
os.environ[envname] = 'Test'
os.environ['PATH'] = os.environ['PATH'] + ':' + envname

j = Job()

j.submit()

self.assertTrue(sleep_until_completed(j, 60), 'Timeout on completing job')

self.assertEqual(j.status, 'completed')
self.assertFalse(file_contains(j.outputdir + '/stdout', envname))

0 comments on commit 62bdef1

Please sign in to comment.