26
26
import matplotlib .pyplot as plt
27
27
28
28
29
-
30
29
@qiita_test_checker ()
31
30
class DBUtilTestsBase (TestCase ):
32
31
def setUp (self ):
@@ -1314,7 +1313,8 @@ def setUp(self):
1314
1313
qdb .util .mem_model3 , qdb .util .mem_model4 ]
1315
1314
self .model_time = [qdb .util .time_model1 , qdb .util .time_model2 ,
1316
1315
qdb .util .time_model3 , qdb .util .time_model4 ]
1317
- self .PATH_TO_DATA = ('./qiita_db/test/test_data/jobs_2024-02-21.tsv.gz' )
1316
+ self .PATH_TO_DATA = ('./qiita_db/test/test_data/'
1317
+ 'jobs_2024-02-21.tsv.gz' )
1318
1318
self .CNAME = "Validate"
1319
1319
self .SNAME = "Diversity types - alpha_vector"
1320
1320
self .COL_NAME = 'samples * columns'
@@ -1328,7 +1328,6 @@ def test_plot_return(self):
1328
1328
self .assertIsInstance (
1329
1329
fig1 , Figure ,
1330
1330
"Returned object fig1 is not a Matplotlib Figure" )
1331
-
1332
1331
for ax in axs1 :
1333
1332
self .assertIsInstance (
1334
1333
ax , Axes ,
@@ -1341,7 +1340,8 @@ def test_minimize_const(self):
1341
1340
_df [self .COL_NAME ] = _df .samples * _df ['columns' ]
1342
1341
fig , axs = plt .subplots (ncols = 2 , figsize = (10 , 4 ), sharey = False )
1343
1342
1344
- bm , options = qdb .util ._resource_allocation_plot_helper (_df , axs [0 ], self .CNAME , self .SNAME , 'MaxRSSRaw' , self .model_mem )
1343
+ bm , options = qdb .util ._resource_allocation_plot_helper (
1344
+ _df , axs [0 ], self .CNAME , self .SNAME , 'MaxRSSRaw' , self .model_mem )
1345
1345
# check that the algorithm calculates correct constants and chooses
1346
1346
# correct model for MaxRSSRaw
1347
1347
k , a , b = options .x
@@ -1353,11 +1353,12 @@ def test_minimize_const(self):
1353
1353
self .assertAlmostEqual (a , at , msg = "a not match expected in MaxRSSRaw" )
1354
1354
self .assertAlmostEqual (b , bt , msg = "b not match expected in MaxRSSRaw" )
1355
1355
1356
- bm , options = qdb .util ._resource_allocation_plot_helper (_df , axs [1 ], self .CNAME , self .SNAME , 'ElapsedRaw' , self .model_time )
1356
+ bm , options = qdb .util ._resource_allocation_plot_helper (
1357
+ _df , axs [1 ], self .CNAME , self .SNAME , 'ElapsedRaw' , self .model_time )
1357
1358
k , a , b = options .x
1358
1359
print (k , a , b )
1359
- kt = 19107.88377185
1360
- at = - 36985.06461777
1360
+ kt = 19107.88377185
1361
+ at = - 36985.06461777
1361
1362
bt = - 36985.06461796
1362
1363
1363
1364
# check that the algorithm calculates correct constants and chooses
0 commit comments