Exemple #1
0
 def test_transform_valid(self):
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     output = job_clusters.transform(valid_q_datablock)
     pprint.pprint(output)
     db = output.get('job_clusters')
     assert db['Totals'].sum() == 7
     assert db.shape[0] == 5
Exemple #2
0
 def test_transform_missing_q(self):
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     output = job_clusters.transform(missing_q_datablock)
     pprint.pprint(output)
     db = output.get('job_clusters')
     assert db['Totals'].sum() == 0
     assert db.shape[0] == 5
     assert db.iloc[
         0,
         0] == "VO_Name=='cms' and RequestCpus==1 and (MaxWallTimeMins>0 and MaxWallTimeMins<= 60*12)"
Exemple #3
0
 def test_consumes(self):
     consumes = ['job_manifests']
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     assert job_clusters.consumes() == consumes
Exemple #4
0
 def test_produces(self):
     produces = ['job_clusters']
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     assert job_clusters.produces() == produces
Exemple #5
0
 def test_consumes(self):
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     assert job_clusters._consumes == {"job_manifests": pandas.DataFrame}
Exemple #6
0
 def test_produces(self):
     job_clusters = job_clustering.JobClustering(config_test_match_exprs)
     assert job_clusters._produces == {"job_clusters": pandas.DataFrame}