Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
add uni tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 21, 2015
1 parent bf2febb commit 40acee2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 24 additions & 0 deletions _unittests/ut_jenkinshelper/test_jenkinsext.py
Expand Up @@ -27,6 +27,30 @@

class TestJenkinsExt(unittest.TestCase):

def test_jenkins_job_verif(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")

engines_default = dict(anaconda2="c:\\Anaconda",
anaconda3="c:\\Anaconda3",
py35="c:\\Python35_x64",
default="c:\\Python34_x64",
winpython="c:\\APythonENSAE\\python")

srv = JenkinsExt(
"http://localhost:8080/", "user", "password",
mock=True, fLOG=fLOG, engines=engines_default)

job = "standalone [conda_update] [anaconda3]"
cmd = srv.get_cmd_standalone(job)
assert "Anaconda3" in cmd

job = "pyrsslocal [py35] <-- pyquickhelper, pyensae"
cmd = "\n".join(srv.get_jenkins_script(job))
assert "Python34" not in cmd

def test_jenkins_ext(self):
fLOG(
__file__,
Expand Down
1 change: 0 additions & 1 deletion src/pyquickhelper/jenkinshelper/jenkins_server.py
Expand Up @@ -199,7 +199,6 @@ def delete_all_jobs(self):
"""
delete all jobs permanently.
@param fLOG logging function
@return list of deleted jobs
.. versionadded:: 1.3
Expand Down

0 comments on commit 40acee2

Please sign in to comment.