Code Duplication    Length = 7-8 lines in 2 locations

smartdispatch/tests/test_job_generator.py 2 locations

@@ 62-69 (lines=8) @@
59
        # Check if needed modules for this queue are included in the PBS file
60
        assert_equal(job_generator.pbs_list[0].modules, self.modules)
61
62
    def test_generate_pbs2_gpu(self):
63
        # Test nb_gpus_per_command argument
64
        # Should needs two PBS file
65
        command_params = {'nb_gpus_per_command': self.gpus // 2}
66
        job_generator = JobGenerator(self.queue_gpu, self.commands, command_params)
67
        assert_equal(len(job_generator.pbs_list), 2)
68
        assert_equal(job_generator.pbs_list[0].commands, self.commands[:2])
69
        assert_equal(job_generator.pbs_list[1].commands, self.commands[2:])
70
71
    def test_generate_pbs4_gpu(self):
72
        # Should needs four PBS files
@@ 40-46 (lines=7) @@
37
        assert_equal(len(job_generator.pbs_list), 1)
38
        assert_equal(job_generator.pbs_list[0].commands, self.commands)
39
40
    def test_generate_pbs2_cpu(self):
41
        # Should needs two PBS file
42
        command_params = {'nb_cores_per_command': self.cores // 2}
43
        job_generator = JobGenerator(self.queue, self.commands, command_params)
44
        assert_equal(len(job_generator.pbs_list), 2)
45
        assert_equal(job_generator.pbs_list[0].commands, self.commands[:2])
46
        assert_equal(job_generator.pbs_list[1].commands, self.commands[2:])
47
48
    def test_generate_pbs4_cpu(self):
49
        # Should needs four PBS file