2626import matplotlib .pyplot as plt
2727
2828
29-
3029@qiita_test_checker ()
3130class DBUtilTestsBase (TestCase ):
3231 def setUp (self ):
@@ -1314,7 +1313,8 @@ def setUp(self):
13141313 qdb .util .mem_model3 , qdb .util .mem_model4 ]
13151314 self .model_time = [qdb .util .time_model1 , qdb .util .time_model2 ,
13161315 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' )
13181318 self .CNAME = "Validate"
13191319 self .SNAME = "Diversity types - alpha_vector"
13201320 self .COL_NAME = 'samples * columns'
@@ -1328,7 +1328,6 @@ def test_plot_return(self):
13281328 self .assertIsInstance (
13291329 fig1 , Figure ,
13301330 "Returned object fig1 is not a Matplotlib Figure" )
1331-
13321331 for ax in axs1 :
13331332 self .assertIsInstance (
13341333 ax , Axes ,
@@ -1341,7 +1340,8 @@ def test_minimize_const(self):
13411340 _df [self .COL_NAME ] = _df .samples * _df ['columns' ]
13421341 fig , axs = plt .subplots (ncols = 2 , figsize = (10 , 4 ), sharey = False )
13431342
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 )
13451345 # check that the algorithm calculates correct constants and chooses
13461346 # correct model for MaxRSSRaw
13471347 k , a , b = options .x
@@ -1353,11 +1353,12 @@ def test_minimize_const(self):
13531353 self .assertAlmostEqual (a , at , msg = "a not match expected in MaxRSSRaw" )
13541354 self .assertAlmostEqual (b , bt , msg = "b not match expected in MaxRSSRaw" )
13551355
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 )
13571358 k , a , b = options .x
13581359 print (k , a , b )
1359- kt = 19107.88377185
1360- at = - 36985.06461777
1360+ kt = 19107.88377185
1361+ at = - 36985.06461777
13611362 bt = - 36985.06461796
13621363
13631364 # check that the algorithm calculates correct constants and chooses
0 commit comments