예제 #1
0
def test_output_for_tempdir_2():
    import shutil
    temp_dir = os.path.join(current_dir, '__deck2pdf')
    shutil.rmtree(temp_dir, ignore_errors=True)
    main([test_slide_path, '-c', 'stub', '-s', 'html5slides', '-n', '1', '--tempdir', './__deck2pdf'])
    assert os.path.exists(temp_dir)
    assert os.path.exists(os.path.join(current_dir, 'slide.pdf'))
예제 #2
0
def test_capture_files():
    # import glob
    output_path = os.path.join(current_dir, '.deck2pdf', 'test.output')
    main([test_slide_path, '-c', 'stub', '-s', 'html5slides', '-n', '4', '-o', output_path])
    assert os.path.exists(output_path)
예제 #3
0
def test_output_file_by_name():
    output_path = os.path.join(current_dir, '.deck2pdf', 'test.output')
    main([test_slide_path, '-c', 'stub', '-s', 'html5slides', '-n', '1', '-o', output_path])
    assert os.path.exists(output_path)
예제 #4
0
def test_output_for_tempdir():
    main([test_slide_path, '-c', 'stub', '-s', 'html5slides', '-n', '1', '--tempdir', './.deck2pdf'])
    assert os.path.exists(os.path.join(current_dir, '.deck2pdf'))
    assert os.path.exists(os.path.join(current_dir, 'slide.pdf'))
예제 #5
0
def test_output_default():
    main([test_slide_path, '-c', 'stub', '-s', 'html5slides', '-n', '1'])
    assert os.path.exists(os.path.join(current_dir, 'slide.pdf'))