From f465b31163826dcc6230c0c3f4f8e117c76dcc74 Mon Sep 17 00:00:00 2001 From: Luiggi Tenorio Date: Fri, 13 Dec 2024 14:07:15 +0100 Subject: [PATCH] Ensure networkx pkl file support (#158) * add 4.1.11 test with networkx pkl file * include autosubmit module --- setup.py | 15 +- tests/experiments/a1ve/conf/as_misc.yml | 2 + .../experiments/a1ve/conf/autosubmit_a1ve.yml | 19 +++ tests/experiments/a1ve/conf/expdef_a1ve.yml | 43 ++++++ tests/experiments/a1ve/conf/jobs_a1ve.yml | 27 ++++ .../a1ve/conf/metadata/experiment_data.yml | 137 ++++++++++++++++++ .../conf/metadata/experiment_data.yml.bak | 137 ++++++++++++++++++ .../experiments/a1ve/conf/platforms_a1ve.yml | 66 +++++++++ tests/experiments/a1ve/pkl/job_list_a1ve.pkl | Bin 0 -> 48588 bytes .../experiments/a1ve/pkl/job_packages_a1ve.db | Bin 0 -> 12288 bytes .../a1ve/status/a1ve_20241212_1514.txt | 8 + tests/experiments/a1ve/tmp/LOG_a1ve/.gitkeep | 0 tests/experiments/autosubmit.db | Bin 20480 -> 20480 bytes .../metadata/data/job_data_a1ve.db | Bin 0 -> 24576 bytes .../metadata/graph/graph_data_a1ve.db | Bin 0 -> 8192 bytes tests/test_persistance.py | 22 ++- 16 files changed, 452 insertions(+), 24 deletions(-) create mode 100755 tests/experiments/a1ve/conf/as_misc.yml create mode 100644 tests/experiments/a1ve/conf/autosubmit_a1ve.yml create mode 100644 tests/experiments/a1ve/conf/expdef_a1ve.yml create mode 100644 tests/experiments/a1ve/conf/jobs_a1ve.yml create mode 100644 tests/experiments/a1ve/conf/metadata/experiment_data.yml create mode 100644 tests/experiments/a1ve/conf/metadata/experiment_data.yml.bak create mode 100644 tests/experiments/a1ve/conf/platforms_a1ve.yml create mode 100644 tests/experiments/a1ve/pkl/job_list_a1ve.pkl create mode 100644 tests/experiments/a1ve/pkl/job_packages_a1ve.db create mode 100644 tests/experiments/a1ve/status/a1ve_20241212_1514.txt create mode 100644 tests/experiments/a1ve/tmp/LOG_a1ve/.gitkeep create mode 100755 tests/experiments/metadata/data/job_data_a1ve.db create mode 100644 tests/experiments/metadata/graph/graph_data_a1ve.db diff --git a/setup.py b/setup.py index a7cfaf5e..0d587855 100644 --- a/setup.py +++ b/setup.py @@ -34,21 +34,14 @@ def get_authors(): "gunicorn~=22.0.0", "pydantic~=2.5.2", "SQLAlchemy~=2.0.23", - "python-cas~=1.6.0" + "python-cas~=1.6.0", + "autosubmit>=4.1.11", ] # Test dependencies -test_requires = [ - "pytest", - "pytest-cov", - "pytest-asyncio", - "ruff" -] +test_requires = ["pytest", "pytest-cov", "pytest-asyncio", "ruff"] -extras_require = { - 'test': test_requires, - 'all': install_requires + test_requires -} +extras_require = {"test": test_requires, "all": install_requires + test_requires} setup( name="autosubmit_api", diff --git a/tests/experiments/a1ve/conf/as_misc.yml b/tests/experiments/a1ve/conf/as_misc.yml new file mode 100755 index 00000000..42f6716e --- /dev/null +++ b/tests/experiments/a1ve/conf/as_misc.yml @@ -0,0 +1,2 @@ +AS_MISC: True +AS_COMMAND: run diff --git a/tests/experiments/a1ve/conf/autosubmit_a1ve.yml b/tests/experiments/a1ve/conf/autosubmit_a1ve.yml new file mode 100644 index 00000000..fd4fbc20 --- /dev/null +++ b/tests/experiments/a1ve/conf/autosubmit_a1ve.yml @@ -0,0 +1,19 @@ +CONFIG: + # Current version of Autosubmit. + AUTOSUBMIT_VERSION: "4.1.11" + # Maximum number of jobs permitted in the waiting status. + MAXWAITINGJOBS: 20 + # Total number of jobs in the workflow. + TOTALJOBS: 20 + SAFETYSLEEPTIME: 10 + RETRIALS: 0 +#wrappers: +# wrapper_sim: +# TYPE: "vertical" +# JOBS_IN_WRAPPER: "SIM" +MAIL: + NOTIFICATIONS: False + TO: +STORAGE: + TYPE: pkl + COPY_REMOTE_LOGS: true diff --git a/tests/experiments/a1ve/conf/expdef_a1ve.yml b/tests/experiments/a1ve/conf/expdef_a1ve.yml new file mode 100644 index 00000000..42335a53 --- /dev/null +++ b/tests/experiments/a1ve/conf/expdef_a1ve.yml @@ -0,0 +1,43 @@ +DEFAULT: + # Job experiment ID. + EXPID: "a1ve" + # Default HPC platform name. + HPCARCH: "local" +EXPERIMENT: + # List of start dates + DATELIST: '20000101' + # List of members. + MEMBERS: fc0 + # Unit of the chunk size. Can be hour, day, month, or year. + CHUNKSIZEUNIT: month + # Size of each chunk. + CHUNKSIZE: '4' + # Number of chunks of the experiment. + NUMCHUNKS: '2' + CHUNKINI: '' + # Calendar used for the experiment. Can be standard or noleap. + CALENDAR: standard +PROJECT: + # Type of the project. + PROJECT_TYPE: none + # Folder to hold the project sources. + PROJECT_DESTINATION: '' +GIT: + PROJECT_ORIGIN: '' + PROJECT_BRANCH: '' + PROJECT_COMMIT: '' + PROJECT_SUBMODULES: '' + FETCH_SINGLE_BRANCH: true +SVN: + PROJECT_URL: '' + PROJECT_REVISION: '' +LOCAL: + PROJECT_PATH: '' +PROJECT_FILES: + FILE_PROJECT_CONF: '' + FILE_JOBS_CONF: '' + JOB_SCRIPTS_TYPE: '' +RERUN: + RERUN: false + RERUN_JOBLIST: '' + diff --git a/tests/experiments/a1ve/conf/jobs_a1ve.yml b/tests/experiments/a1ve/conf/jobs_a1ve.yml new file mode 100644 index 00000000..ee2cd578 --- /dev/null +++ b/tests/experiments/a1ve/conf/jobs_a1ve.yml @@ -0,0 +1,27 @@ +JOBS: + ini: + FILE: ini.sh + RUNNING: once + + sim: + FILE: sim.sh + DEPENDENCIES: ini sim-1 + RUNNING: once + + asim: + FILE: asim.sh + DEPENDENCIES: sim + RUNNING: once + SPLITS: 3 + + post: + FILE: post.sh + RUNNING: once + DEPENDENCIES: + asim: + SPLITS_FROM: + 2,3: # [2:3] is also valid + splits_to: 1,2*,3* # 1,[2:3]* is also valid, you can also specify the step with [2:3:step] + SPLITS: 3 + + diff --git a/tests/experiments/a1ve/conf/metadata/experiment_data.yml b/tests/experiments/a1ve/conf/metadata/experiment_data.yml new file mode 100644 index 00000000..16d207a0 --- /dev/null +++ b/tests/experiments/a1ve/conf/metadata/experiment_data.yml @@ -0,0 +1,137 @@ +CONFIG: + AUTOSUBMIT_VERSION: 4.1.11 + MAXWAITINGJOBS: 20 + TOTALJOBS: 20 + SAFETYSLEEPTIME: 10 + RETRIALS: 0 +MAIL: + NOTIFICATIONS: false + TO: +STORAGE: + TYPE: pkl + COPY_REMOTE_LOGS: true +DEFAULT: + EXPID: a1ve + HPCARCH: LOCAL +EXPERIMENT: + DATELIST: '20000101' + MEMBERS: fc0 + CHUNKSIZEUNIT: month + CHUNKSIZE: 4 + NUMCHUNKS: 2 + CHUNKINI: '' + CALENDAR: standard +PROJECT: + PROJECT_TYPE: none + PROJECT_DESTINATION: '' +GIT: + PROJECT_ORIGIN: '' + PROJECT_BRANCH: '' + PROJECT_COMMIT: '' + PROJECT_SUBMODULES: '' + FETCH_SINGLE_BRANCH: true +SVN: + PROJECT_URL: '' + PROJECT_REVISION: '' +LOCAL: + PROJECT_PATH: '' +PROJECT_FILES: + FILE_PROJECT_CONF: '' + FILE_JOBS_CONF: '' + JOB_SCRIPTS_TYPE: '' +RERUN: + RERUN: false + RERUN_JOBLIST: '' +JOBS: + INI: + FILE: ini.sh + RUNNING: once + DEPENDENCIES: {} + ADDITIONAL_FILES: [] + SIM: + FILE: sim.sh + DEPENDENCIES: + INI: {} + SIM-1: {} + RUNNING: once + ADDITIONAL_FILES: [] + ASIM: + FILE: asim.sh + DEPENDENCIES: + SIM: {} + RUNNING: once + SPLITS: 3 + ADDITIONAL_FILES: [] + POST: + FILE: post.sh + RUNNING: once + DEPENDENCIES: + ASIM: + SPLITS_FROM: + 2,3: + SPLITS_TO: 1,2*,3* + SPLITS: 3 + ADDITIONAL_FILES: [] +PLATFORMS: + MARENOSTRUM4: + TYPE: slurm + HOST: mn1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + MAX_WALLCLOCK: 48:00 + TEMP_DIR: '' + MARENOSTRUM_ARCHIVE: + TYPE: ps + HOST: dt02.bsc.es + PROJECT: bsc32 + USER: + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + TEST_SUITE: false + TRANSFER_NODE: + TYPE: ps + HOST: dt01.bsc.es + PROJECT: bsc32 + USER: + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /gpfs/scratch + TRANSFER_NODE_BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + NORD3: + TYPE: SLURM + HOST: nord1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + MAX_WALLCLOCK: 48:00 + ECMWF-XC40: + TYPE: ecaccess + VERSION: pbs + HOST: cca + USER: + PROJECT: spesiccf + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /scratch/ms + QUEUE: np + SERIAL_QUEUE: ns + MAX_WALLCLOCK: 48:00 +ROOTDIR: /home/ltenorio/autosubmit/a1ve +PROJDIR: /home/ltenorio/autosubmit/a1ve/proj/ diff --git a/tests/experiments/a1ve/conf/metadata/experiment_data.yml.bak b/tests/experiments/a1ve/conf/metadata/experiment_data.yml.bak new file mode 100644 index 00000000..16d207a0 --- /dev/null +++ b/tests/experiments/a1ve/conf/metadata/experiment_data.yml.bak @@ -0,0 +1,137 @@ +CONFIG: + AUTOSUBMIT_VERSION: 4.1.11 + MAXWAITINGJOBS: 20 + TOTALJOBS: 20 + SAFETYSLEEPTIME: 10 + RETRIALS: 0 +MAIL: + NOTIFICATIONS: false + TO: +STORAGE: + TYPE: pkl + COPY_REMOTE_LOGS: true +DEFAULT: + EXPID: a1ve + HPCARCH: LOCAL +EXPERIMENT: + DATELIST: '20000101' + MEMBERS: fc0 + CHUNKSIZEUNIT: month + CHUNKSIZE: 4 + NUMCHUNKS: 2 + CHUNKINI: '' + CALENDAR: standard +PROJECT: + PROJECT_TYPE: none + PROJECT_DESTINATION: '' +GIT: + PROJECT_ORIGIN: '' + PROJECT_BRANCH: '' + PROJECT_COMMIT: '' + PROJECT_SUBMODULES: '' + FETCH_SINGLE_BRANCH: true +SVN: + PROJECT_URL: '' + PROJECT_REVISION: '' +LOCAL: + PROJECT_PATH: '' +PROJECT_FILES: + FILE_PROJECT_CONF: '' + FILE_JOBS_CONF: '' + JOB_SCRIPTS_TYPE: '' +RERUN: + RERUN: false + RERUN_JOBLIST: '' +JOBS: + INI: + FILE: ini.sh + RUNNING: once + DEPENDENCIES: {} + ADDITIONAL_FILES: [] + SIM: + FILE: sim.sh + DEPENDENCIES: + INI: {} + SIM-1: {} + RUNNING: once + ADDITIONAL_FILES: [] + ASIM: + FILE: asim.sh + DEPENDENCIES: + SIM: {} + RUNNING: once + SPLITS: 3 + ADDITIONAL_FILES: [] + POST: + FILE: post.sh + RUNNING: once + DEPENDENCIES: + ASIM: + SPLITS_FROM: + 2,3: + SPLITS_TO: 1,2*,3* + SPLITS: 3 + ADDITIONAL_FILES: [] +PLATFORMS: + MARENOSTRUM4: + TYPE: slurm + HOST: mn1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + MAX_WALLCLOCK: 48:00 + TEMP_DIR: '' + MARENOSTRUM_ARCHIVE: + TYPE: ps + HOST: dt02.bsc.es + PROJECT: bsc32 + USER: + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + TEST_SUITE: false + TRANSFER_NODE: + TYPE: ps + HOST: dt01.bsc.es + PROJECT: bsc32 + USER: + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /gpfs/scratch + TRANSFER_NODE_BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + NORD3: + TYPE: SLURM + HOST: nord1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + MAX_WALLCLOCK: 48:00 + ECMWF-XC40: + TYPE: ecaccess + VERSION: pbs + HOST: cca + USER: + PROJECT: spesiccf + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /scratch/ms + QUEUE: np + SERIAL_QUEUE: ns + MAX_WALLCLOCK: 48:00 +ROOTDIR: /home/ltenorio/autosubmit/a1ve +PROJDIR: /home/ltenorio/autosubmit/a1ve/proj/ diff --git a/tests/experiments/a1ve/conf/platforms_a1ve.yml b/tests/experiments/a1ve/conf/platforms_a1ve.yml new file mode 100644 index 00000000..5ae520b5 --- /dev/null +++ b/tests/experiments/a1ve/conf/platforms_a1ve.yml @@ -0,0 +1,66 @@ +PLATFORMS: + MARENOSTRUM4: + TYPE: slurm + HOST: mn1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + MAX_WALLCLOCK: 48:00 + TEMP_DIR: '' + MARENOSTRUM_ARCHIVE: + TYPE: ps + HOST: dt02.bsc.es + PROJECT: bsc32 + USER: + SCRATCH_DIR: /gpfs/scratch + ADD_PROJECT_TO_HOST: false + TEST_SUITE: false + + TRANSFER_NODE: + TYPE: ps + HOST: dt01.bsc.es + PROJECT: bsc32 + USER: + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /gpfs/scratch + + TRANSFER_NODE_BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + + BSCEARTH000: + TYPE: ps + HOST: bscearth000 + USER: + PROJECT: Earth + ADD_PROJECT_TO_HOST: false + QUEUE: serial + SCRATCH_DIR: /esarchive/scratch + NORD3: + TYPE: SLURM + HOST: nord1.bsc.es + PROJECT: bsc32 + USER: + QUEUE: debug + SCRATCH_DIR: /gpfs/scratch + MAX_WALLCLOCK: 48:00 + + ECMWF-XC40: + TYPE: ecaccess + VERSION: pbs + HOST: cca + USER: + PROJECT: spesiccf + ADD_PROJECT_TO_HOST: false + SCRATCH_DIR: /scratch/ms + QUEUE: np + SERIAL_QUEUE: ns + MAX_WALLCLOCK: 48:00 + diff --git a/tests/experiments/a1ve/pkl/job_list_a1ve.pkl b/tests/experiments/a1ve/pkl/job_list_a1ve.pkl new file mode 100644 index 0000000000000000000000000000000000000000..5be56203c7107485e60d565a3d4a2b1f2a35f49b GIT binary patch literal 48588 zcmeHQdyE^$c|YAl_tM?TXIYlzXB5ji%Q8>*u${O`Yl_^{QO8?e$fcx9>u!1EO2ZY8 zWcbjdhJYj}0$;GH+j`Rn+NN$D$93JhuIs=E0`~<32!aCrqb>SJ5ELko21S7aMNt$1 zg0{bJW_LM!-9wgSS(+2X-Tmg9Z)d)lo!$BUX21RXz*qnJ{T}}394K0~OQp(%%b{!` zQ>|LnP%eMIk|{IS8I0yn^1YYc$G_lSb*G$rd5W2-)hcE#pRJkaGTBaFq*6R5} zEnlpu zt&-0a$jBZ~)vR49TR0x~^O~QlTXmA`_V%0}*BLR(nMy5R%a@8SJLHU#p)0~DG>6Qp zmE~zpAJq%$mokMywouAmK-G^QfA;us*BQQ)W%c5Pd@)NVcAK?K^#Yo07m{{!?^H=X znX}Gi>V+De5H&)3RJqr7<=~OSxx=p0n={eahjS+Ocde3im87d&y2_=?BwZ%yGM6rM z={iZ*NxIIZ>yXw__!_HNnH&{m#&t%`a;22Ds?`!s%${=w&2?*?x*E#1*V{MYVqSbv z5ne60fvc`@@Av02HS*yIZAHuB2%P{`a@iy*%v;kv^?&%o5pN#SH_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>QH{D%lka|ZHD6CqZt&r$(#JX+@Uh~*4fRm$; z8rt%TScpAEq7jIaiG)EN$39AuVMshM&b~Gznx^+VL!v)2kv|j?-B>%#AM^q4?eXD1 z8h{Ax3j`<9Q2>dD8o@kTV8I~Bhjum+Pp4w1W5z1!@AoaXV3HdR)BK~!;-!+nN_&S7 za7QYdia~wTV^HsOP4uHQa@-kfqQ8r(-fl>A-RU;-CW`okV^)+M3j|R#2(@jaVAkGdjuk0QhS{CNZY;(dv&iiQzCJK63Gen zC{Gln_H674a!yiW9i^_;vsu^f#i27$Eaj}K>pW1jYL`lt3ztLLLZ(`^s-cQiE>&t5 e^VTIK59v@ljeYlJ_wg^F#_SlotGZTS3;jRo%GP55 literal 0 HcmV?d00001 diff --git a/tests/experiments/a1ve/pkl/job_packages_a1ve.db b/tests/experiments/a1ve/pkl/job_packages_a1ve.db new file mode 100644 index 0000000000000000000000000000000000000000..dbb92f1ff56284d8b082df017eaf8a620d8a2a78 GIT binary patch literal 12288 zcmeI#ziYxk6u|L2Bbr6h&Gmtcf_BM2&{VRyv~_a`r=G-DbQSR&Kjl1hgel7LY!eFzFO-Pq6EWSPyA)pnX>X0|r( zmmYb;*Ekx-GLD`{v0QjZy7ntemh--xiXWae_2s%tRSy#+Z!>OZfR%`J)*4Z}9KrpT%F!AGKLfz=K~_I*pYWae_2s^h6nF#^{X+OZa(M_{$miZ}9KrpT%FkSx_OJe{;EfhX5nXA_D~g DUr`PK diff --git a/tests/experiments/metadata/data/job_data_a1ve.db b/tests/experiments/metadata/data/job_data_a1ve.db new file mode 100755 index 0000000000000000000000000000000000000000..a10b22290b645132e4d948110850f8cc3e9bbc85 GIT binary patch literal 24576 zcmeHOPiz}m8TZ6a>ZF-Yx-3K-qP1KJn%y+99k(i}Rxq_E>2z(6cV^se3(IKYOd44 zTfVR&G#c$a=b>7(Zfe)9id8!OlK?B4j={YJat9!%=&_1$Q#dYw1Dx4O>QzU_J!x{d&{3qK9pugDlcN9T7#ae-`o<;EU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z9G;y{?(}(hD!Grv4@du-=&`;qIc}~6(BrrsiJR!8iqKD+R6itfLlZ?fZo)}5x;7Z6 zG$?5Hp@1Fh^V1oXBME9MqfRqZ{L&u`QF8&CrK#vqlLMn@#0?oGo|zmp*ZkRm!u4dM z(0S;os6m37`_mrv5CwKj z3LHGs;FK0(KRk6x{{%W5KOgs}<{}t{d0cEn#nT|1=t6_W zD1&RTVxYbO%a1+*>!U=xC8T0WT&s)$uM}Q;15#R`L1ULd50geDifFr;W;0SO8 zo*@LzCxi<^_-)xzh(gbFq!5Lk_?#mY`ksfLt%xBC?X?)9&|YUl6ngZq5Teins`(Iw z9z!Gvg}!p3z0QOvwAWmSLVL}gO9(4M@S-LmCgxWJav%tM{P>^*Cjc{xiR8*Wse=;P z|4U*_`at@Q^tyCO`myv#DoZQUkEE9LvLs6Xkp3e5LHf-z_H#^0SG_<0uX=z1Rwwb2tWV=w;^zq{GsRj{M#?}_F&BAY>F&5$1>R$`uvuph5l@8 zwx+QNlpqyMq@czT@?0lNDU6huiI}3fqG&DUfL!POv`vmWH>AX??f&_>G|qoDb{BE@ r62u#N78~-iwD0z--P|ty2m~Mi0SG_<0uX=z1Rwwb2tWV=cP#J=Ku1Pt literal 0 HcmV?d00001 diff --git a/tests/test_persistance.py b/tests/test_persistance.py index c716c3e9..0eb2ad0b 100644 --- a/tests/test_persistance.py +++ b/tests/test_persistance.py @@ -1,17 +1,13 @@ from autosubmit_api.persistance.pkl_reader import PklReader +import pytest class TestPklReader: - - def test_reader(self, fixture_mock_basic_config): - test_cases = [ - {"expid": "a003", "size": 8}, - {"expid": "a007", "size": 8}, - {"expid": "a3tb", "size": 55}, - ] - - for exp in test_cases: - content = PklReader(exp["expid"]).parse_job_list() - assert len(content) == exp["size"] - for item in content: - assert item.name.startswith(exp["expid"]) + @pytest.mark.parametrize( + "expid, size", [("a003", 8), ("a007", 8), ("a3tb", 55), ("a1ve", 8)] + ) + def test_reader(self, fixture_mock_basic_config, expid, size): + content = PklReader(expid).parse_job_list() + assert len(content) == size + for item in content: + assert item.name.startswith(expid)