Beispiel #1
0
    def test_end_to_end(self, input_and_expected):
        vtt_assembly, expected = input_and_expected

        ft_assembly = transform_assembly(vtt_assembly)
        ft_program = make_ft_program(ft_assembly)
        generated = pformat_tti(ft_program)

        assert expected == generated
Beispiel #2
0
    def test_end_to_end(self, input_and_expected):
        vtt_assembly, expected = input_and_expected

        ft_assembly = transform_assembly(vtt_assembly)
        ft_program = make_ft_program(ft_assembly)
        generated = pformat_tti(ft_program)

        assert expected == generated
Beispiel #3
0
def input_and_expected(request, test_name):
    inpuf_filename = test_name + ".txt"
    with open(os.path.join(DATA_DIR, inpuf_filename)) as fp:
        input_vtt_assembly = fp.read()

    expected_filename = test_name + "_transformed.txt"
    with open(os.path.join(DATA_DIR, expected_filename)) as fp:
        expected_ft_assembly = fp.read()
    ft_program = make_ft_program(expected_ft_assembly)
    expected_ft_assembly = pformat_tti(ft_program)

    return input_vtt_assembly, expected_ft_assembly
Beispiel #4
0
def input_and_expected(request, test_name):
    inpuf_filename = test_name + ".txt"
    with open(os.path.join(DATA_DIR, inpuf_filename)) as fp:
        input_vtt_assembly = fp.read()

    expected_filename = test_name + "_transformed.txt"
    with open(os.path.join(DATA_DIR, expected_filename)) as fp:
        expected_ft_assembly = fp.read()
    ft_program = make_ft_program(expected_ft_assembly)
    expected_ft_assembly = pformat_tti(ft_program)

    return input_vtt_assembly, expected_ft_assembly