Skip to content

Commit

Permalink
Updates to @charles-cowart comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gossty committed May 16, 2024
1 parent 3f70bc1 commit 4fc8735
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions qiita_db/support_files/patches/test_db_sql/92.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- 05/07/24
-- tmp file for @Gossty
-- 05/07/24
-- This file serves as a comprehensive testcase for resource allocation plots


INSERT INTO qiita.processing_job(processing_job_id, email, command_id, command_parameters, processing_job_status_id)
Expand Down
10 changes: 7 additions & 3 deletions qiita_db/test/test_software.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,19 @@ def test_processing_jobs(self):
'063e553b-327c-4818-ab4a-adfe58e49860',
'ac653cb5-76a6-4a45-929e-eb9b2dee6b63']

exp = set([qdb.processing_job.ProcessingJob(j) for j in exp_jids])
set_jobs = set(qdb.software.Command(1).processing_jobs)
jobs = qdb.software.Command(1).processing_jobs
set_jobs = set(jobs)

# comparing the length of jobs and set_jobs, since there could've been
# duplicates in the tests
self.assertEqual(len(jobs), len(set_jobs))

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

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

self.assertCountEqual(qdb.software.Command(4).processing_jobs, [])


Expand Down
3 changes: 3 additions & 0 deletions qiita_db/test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,9 @@ def setUp(self):
"sName", "sVersion", "cID", "cName", "processing_job_id",
"parameters", "samples", "columns", "input_size", "extra_info",
"MaxRSSRaw", "ElapsedRaw"]

# df is a dataframe that represents a table with columns specified in
# self.columns
self.df = qdb.util._retrieve_resource_data(
self.CNAME, self.SNAME, self.columns)

Expand Down

0 comments on commit 4fc8735

Please sign in to comment.