Example #1
0
 def test_error_too_many_values(self):
     with self.assertRaises(Exception):
         tablefill(
             template=
             'test/raw/tablefill/tablefill_template_too_many_values.lyx',
             inputs=['test/raw/tablefill/tablefill.txt'],
             output='test/output/tablefill.lyx')
Example #2
0
 def test_error_missing_input(self):
     with self.assertRaises(Exception):
         tablefill(
             template=
             'test/raw/tablefill/tablefill_template_missing_input.lyx',
             inputs=['test/raw/tablefill/tablefill.txt'],
             output='test/output/tablefill.lyx')
Example #3
0
    def test_null(self):
        tablefill(template='test/raw/tablefill/tablefill_template.lyx',
                  inputs=['test/raw/tablefill/tablefill.txt'],
                  output='test/output/tablefill.lyx',
                  null='0')

        self.assertTrue(os.path.isfile('test/output/tablefill.lyx'))
Example #4
0
    def test_extra_input(self):
        tablefill(
            template='test/raw/tablefill/tablefill_template_extra_input.lyx',
            inputs=['test/raw/tablefill/tablefill.txt'],
            output='test/output/tablefill.lyx')

        self.assertTrue(os.path.isfile('test/output/tablefill.lyx'))
Example #5
0
 def test_error_duplicate(self):
     with self.assertRaises(Exception):
         tablefill(template='test/raw/tablefill/tablefill_template.lyx',
                   inputs=[
                       'test/raw/tablefill/tablefill.txt',
                       'test/raw/tablefill/tablefill_duplicate.txt'
                   ],
                   output='test/output/tablefill.lyx')
Example #6
0
############

### START MAKE
gs.remove_dir(['input', 'external'])
gs.clear_dir(['output', 'log'])
gs.start_makelog(PATHS)

### MAKE LINKS TO INPUT AND EXTERNAL FILES
inputs = gs.copy_inputs(PATHS, ['input.txt'])
externals = gs.copy_externals(PATHS, ['external.txt'])
gs.write_source_logs(PATHS, inputs + externals)
gs.get_modified_sources(PATHS, inputs + externals)

### FILL TABLES
gs.tablefill(template='code/tables.lyx',
             inputs='input/regression.csv',
             output='output/tables_filled.lyx')

### RUN SCRIPTS
gs.run_lyx(PATHS, program='code/paper.lyx')
gs.run_lyx(PATHS, program='code/online_appendix.lyx')
gs.run_lyx(PATHS, program='code/slides.lyx')

### LOG OUTPUTS
gs.log_files_in_output(PATHS)

### CHECK FILE SIZES
gs.check_module_size(PATHS)

### END MAKE
gs.end_makelog(PATHS)
Example #7
0
    def test_tablefill_string(self):
        tablefill(template='test/raw/tablefill/tablefill_template.lyx',
                  inputs='test/raw/tablefill/tablefill.txt',
                  output='test/output/tablefill.lyx')

        self.assertTrue(os.path.isfile('test/output/tablefill.lyx'))
Example #8
0
    def test_tablefill_space(self):
        tablefill(template='test/raw/tablefill/tablefill_template space.lyx',
                  inputs=['test/raw/tablefill/tablefill space.txt'],
                  output='test/output/tablefill space.lyx')

        self.assertTrue(os.path.isfile('test/output/tablefill space.lyx'))
Example #9
0
    def test_tablefill_character(self):
        tablefill(template='test/raw/tablefill/tablefill_template_╬▓.lyx',
                  inputs=['test/raw/tablefill/tablefill_╬▓.txt'],
                  output='test/output/tablefill_╬▓.lyx')

        self.assertTrue(os.path.isfile('test/output/tablefill_╬▓.lyx'))