Example #1
0
def test_generate_problems_to_pdf():
    filename = 'test_generate_problems_and_convert.tex'
    contents = generate_problems(number_of_problems=10,
                                 maximum_integer=10,
                                 problem_type='Addition')
    convert_latex_to_pdf(filename=filename, contents=contents, view=True)
    remove_temporary_files(filename)
Example #2
0
def test_generate_problems_addition():
    contents = generate_problems(number_of_problems=10,
                                 maximum_integer=50,
                                 problem_type='Addition')
    assert contents.count('+') == 10
Example #3
0
def test_generate_problems_subtraction():
    contents = generate_problems(number_of_problems=10,
                                 maximum_integer=50,
                                 problem_type='Subtraction')
    assert contents.count('-') == 10