import unittest

import numpy as np
import numpy.testing as np_testing

from bcn.utils import submit

class TestLocal(unittest.TestCase):
    def setUp(self):
        seed = 42
        np.random.seed(seed)
        
    def test_submit(self):
        parameters = 
        submit(parameters['mode'], parameters['class'], parameters, # TODO Just submit parameters, not specific items too.
           path='PUBLICATION/bcn/bcn') # TODO Change path to full.
        np_testing.assert_almost_equal()
           
 class TestParallel(unittest.TestCase):
    def setUp(self):
        seed = 42
        np.random.seed(seed)
        
    def test_submit(self):
        parameters = 
        submit(parameters['mode'], parameters['class'], parameters, # TODO Just submit parameters, not specific items too.
           path='PUBLICATION/bcn/bcn') # TODO Change path to full.
        np_testing.assert_almost_equal()

@@ -109,13 +109,20 @@
 Test
-Local
+SubmitCustom
 (uni
@@ -189,437 +189,1744 @@
     
-np.random.seed(seed)%0A        %0A    def test_submit(self):%0A        parameters = %0A        submit(parameters%5B'mode'%5D, parameters%5B'clas
+run = 'unittest-custom'%0A        parameters = %7B'class': 'Experiment',%0A                      'name': run,%0A                      'mode': None,%0A                      'visualization_extension': '.png',%0A                      'figure_size': (8, 8),%0A                      'seed': seed,%0A                      'replicates': 1,%0A                      'shape': (100, 110),%0A                      'correlation_strength': 1.0,%0A                      'normalize_stds': True,  # stds, correlations%0A                      'signal_model': ('random', 'random'),%0A                      'noise_model': 'low-rank',  # 'bicluster
 s'
-%5D
 , 
-parameters, # TODO Just submit parameters, not specific items too.%0A           path='PUBLICATION/bcn/bcn') # TODO Change path to full.%0A        np_testing.assert_almost_equal()%0A           %0A class TestParallel(unittest.TestCase):%0A    def setUp(self):%0A        seed = 42%0A        np.random.seed(seed)
+image', 'euclidean'%0A                      'missing_model': 'no-missing',  # 'MAR', 'NMAR', 'no-missing', 'SCAN'%0A                      'estimate': (False, False),  # pairs, stds%0A                      'restarts': 1,%0A                      'noise_amplitude': 5.0,%0A                      'p_random': 0.05,%0A                      'known_correlations': 1.0,%0A                      'operator_name': 'custom',%0A                      'additive_noise_y_std': None,%0A                      'additive_noise_A_std': None,%0A                      'm_blocks': 15,%0A                      'save_signal': False,%0A                      'sparsity': 2,%0A                      'verbosity': 2,%0A                      'logverbosity': 2,%0A                      'maxiter': 1000,%0A                      'maxtime': 100,%0A                      'mingradnorm': 1e-12,%0A                      'minstepsize': 1e-12,%0A                      'incorrect_A_std': 1.0,%0A                      'free_x': ('rank', list(np.asarray(np.linspace(1, 5, 5), dtype=int))),%0A                      'free_y': ('measurements', list(np.asarray(np.logspace(np.log10(3000), np.log10(1.1e4), 5), dtype=int)))%7D
 %0A   
@@ -1944,22 +1944,21 @@
 ef test_
-submit
+local
 (self):%0A
@@ -1975,19 +1975,34 @@
 rameters
- = 
+%5B'mode'%5D = 'local'
 %0A       
@@ -2023,172 +2023,147 @@
 ters
-%5B'mode'%5D, parameters%5B'class'%5D, parameters, # TODO Just submit parameters, not specific items too.%0A           path='PUBLICATION/bcn/bcn') # TODO Change path to full.
+)%0A        np_testing.assert_almost_equal()%0A%0A    def test_parallel(self):%0A        parameters%5B'mode'%5D = 'parallel'%0A        submit(parameters)
 %0A   
@@ -2180,28 +2180,54 @@
 sting.assert_almost_equal()%0A
+        %0A        %0A       %0A

Update test_custom.py