示例#1
0
 def test_stage_set_loc(self):
     """ Does the stage setter properly set location's stage? """
     mkv = MKV(test_paths['default'], stages.STAGE_0)
     mkv.state.clean_name = 'Default Test'
     assert mkv.state.stage == 0
     mkv.stage = stages.STAGE_1
     assert mkv.state.stage == 1
示例#2
0
def get_mkv(request):
    """ Some sort of black magic fixture to provide an object to the entire test class """
    mkv_path = 'tests/processing/1_remux/Stage 1 Test Good.mkv'
    mkv = MKV(mkv_path, stages.STAGE_0)

    if request.cls is not None:
        request.cls.mkv = mkv

    # Set the sanitized name, since that will be used
    mkv.state.clean_name = 'Stage 1 Test Good'
    mkv.stage = stages.STAGE_1

    yield mkv
示例#3
0
def get_mkv(request):
    """ Some sort of black magic fixture to provide an object to the entire test class """
    mkv_path = 'tests/processing/2_mix/Stage 2 Test Good.mkv'
    mkv = MKV(mkv_path, stages.STAGE_0)

    if request.cls is not None:
        request.cls.mkv = mkv

    # Note: during normal pipeline execution these values would have been
    # set in previous stages.
    mkv.state.clean_name = 'Stage 2 Test Good'
    mkv.state.assoc_files['stereo_mix'] = pathlib.Path(
        'tests/processing/2_mix/Stage 2 Test Good.m4a')
    mkv.stage = stages.STAGE_2

    yield mkv
示例#4
0
 def test_stage_set(self):
     """ Does the stage setter work? """
     mkv = MKV(test_paths['default'], stages.STAGE_0)
     mkv.state.clean_name = 'Default Test'
     mkv.stage = stages.STAGE_1
     assert mkv.stage == 1