Skip to content

Commit 4fc8735

Browse files
committed
Updates to @charles-cowart comments
1 parent 3f70bc1 commit 4fc8735

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

qiita_db/support_files/patches/test_db_sql/92.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-- 05/07/24
2-
-- tmp file for @Gossty
1+
-- 05/07/24
2+
-- This file serves as a comprehensive testcase for resource allocation plots
33

44

55
INSERT INTO qiita.processing_job(processing_job_id, email, command_id, command_parameters, processing_job_status_id)

qiita_db/test/test_software.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,19 @@ def test_processing_jobs(self):
495495
'063e553b-327c-4818-ab4a-adfe58e49860',
496496
'ac653cb5-76a6-4a45-929e-eb9b2dee6b63']
497497

498-
exp = set([qdb.processing_job.ProcessingJob(j) for j in exp_jids])
499-
set_jobs = set(qdb.software.Command(1).processing_jobs)
498+
jobs = qdb.software.Command(1).processing_jobs
499+
set_jobs = set(jobs)
500+
501+
# comparing the length of jobs and set_jobs, since there could've been
502+
# duplicates in the tests
503+
self.assertEqual(len(jobs), len(set_jobs))
500504

505+
exp = set([qdb.processing_job.ProcessingJob(j) for j in exp_jids])
501506
self.assertEqual(len(set_jobs & exp), len(exp_jids))
502507

503508
exp_jids = ['bcc7ebcd-39c1-43e4-af2d-822e3589f14d']
504509
exp = [qdb.processing_job.ProcessingJob(j) for j in exp_jids]
505510
self.assertCountEqual(qdb.software.Command(2).processing_jobs, exp)
506-
507511
self.assertCountEqual(qdb.software.Command(4).processing_jobs, [])
508512

509513

qiita_db/test/test_util.py

+3
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,9 @@ def setUp(self):
13161316
"sName", "sVersion", "cID", "cName", "processing_job_id",
13171317
"parameters", "samples", "columns", "input_size", "extra_info",
13181318
"MaxRSSRaw", "ElapsedRaw"]
1319+
1320+
# df is a dataframe that represents a table with columns specified in
1321+
# self.columns
13191322
self.df = qdb.util._retrieve_resource_data(
13201323
self.CNAME, self.SNAME, self.columns)
13211324

0 commit comments

Comments
 (0)