Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_expand_braces():
expand_braces = AdapterSpecification.expand_braces
assert expand_braces('') == ''
assert expand_braces('A') == 'A'
assert expand_braces('A{0}') == ''
assert expand_braces('A{1}') == 'A'
assert expand_braces('A{2}') == 'AA'
assert expand_braces('A{2}C') == 'AAC'
assert expand_braces('ACGTN{3}TGACCC') == 'ACGTNNNTGACCC'
assert expand_braces('ACGTN{10}TGACCC') == 'ACGTNNNNNNNNNNTGACCC'
assert expand_braces('ACGTN{3}TGA{4}CCC') == 'ACGTNNNTGAAAACCC'
assert expand_braces('ACGTN{0}TGA{4}CCC') == 'ACGTTGAAAACCC'
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')
def test_parse_not_linked():
p = AdapterSpecification.parse
assert p('A', 'front') == AdapterSpecification(None, None, 'A', {}, 'front')
assert p('A', 'back') == AdapterSpecification(None, None, 'A', {}, 'back')
assert p('A', 'anywhere') == AdapterSpecification(None, None, 'A', {}, 'anywhere')
assert p('^A', 'front') == AdapterSpecification(None, 'anchored', 'A', {}, 'front')
assert p('XXXA', 'front') == AdapterSpecification(None, 'noninternal', 'A', {}, 'front')
assert p('A$', 'back') == AdapterSpecification(None, 'anchored', 'A', {}, 'back')
assert p('AXXXX', 'back') == AdapterSpecification(None, 'noninternal', 'A', {}, 'back')
assert p('a_name=ADAPT', 'front') == AdapterSpecification('a_name', None, 'ADAPT', {}, 'front')