Exemple #1
0
def test_tester_long_and_invert():
    input_ = testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("00000000000000001"))
    #  input: 00000000000000001
    # result: 0...............1
    r = core.cleaner(input_)
    assert testing.segiterToShortcode(r) == "0...............1"
Exemple #2
0
def test_deglitcher_single2():
    # threshold=1, no modification
    input_ = testing.makeSimpleTrack('input', testing.shortcodeToSegiter("A."))
    #   input: A.
    #  result: A.
    r = core.deglitcher(input_)
    assert testing.segiterToShortcode(r) == "A."
Exemple #3
0
def test_tester_longreps():
    input_ = testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("0000000000000000"))
    #  input: 0000000000000000
    # result: 0...............
    r = core.cleaner(input_)
    assert testing.segiterToShortcode(r) == "0..............."
Exemple #4
0
def test_regionselector_allrun():
    #  input: R.....................
    # result: R.....................
    input_ = testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("R....................."))
    r = core.transitionGenerator(input_, 0, d, u, 1, 1)
    assert testing.segiterToShortcode(r) == "R....................."
Exemple #5
0
def test_deglitcher_trailingshort():
    # threshold=1, trailing should be unmodified
    input_ = testing.makeSimpleTrack('input',
                                     testing.shortcodeToSegiter("AB.A"))
    #   input: AB.A
    #  result: B..A
    r = core.deglitcher(input_)
    assert testing.segiterToShortcode(r) == "B..A"
Exemple #6
0
def test_tester_short2():
    input_ = testing.makeSimpleTrack('input', testing.shortcodeToSegiter("0."))
    #  input: 0.
    # result: 0.
    r = core.cleaner(input_)
    assert testing.segiterToShortcode(r) == "0."
Exemple #7
0
def input_():
    return testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("00110.1.0.01.111100000101"))
Exemple #8
0
def input_():
    return testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("ABCA.B.C.A..B..C..A..."))
Exemple #9
0
def input_():
    return testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("ABC.D.E..F..G...H..I..."))
Exemple #10
0
def input_():
    return testing.makeSimpleTrack(
        'input', testing.shortcodeToSegiter("0.R0R0.R0..R0...R0...."))