Skip to content

Commit

Permalink
final test migration
Browse files Browse the repository at this point in the history
  • Loading branch information
BjornFJohansson committed Nov 15, 2016
1 parent 070accf commit d459f1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
9 changes: 2 additions & 7 deletions tests/test_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def test_pretty():

x= '/label="2micron 2µ"'
x= u'/label="2micron 2µ"'

import io
from Bio import SeqIO
Expand All @@ -31,10 +31,5 @@ def test_pretty():

assert pydna.read("pydna_read_test.txt").format("gb")[559:578] == x

print(x)
print(y)


if __name__ == '__main__':
print(__file__)
pytest.cmdline.main([__file__, "-v"])
pytest.cmdline.main([__file__, "-v", "-s"])
12 changes: 6 additions & 6 deletions tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def test_pth1():
a, b = BPparse("pth1.txt", "gb")

x, y = parse("pth1.txt")
assert a.features[13].qualifiers['label'][0] == '2micron 2µ'
assert a.features[13].qualifiers['label'][0] == u'2micron 2µ'


print(a.format("gb")[3270:3281])
a.format("gb")[3314:3325] == '2micron 2µ'
a.format("gb")[3314:3325] == u'2micron 2µ'
#assert a.format("gb")[3270:3281] == '2micron 2µ'

assert "".join(a.format("gb").splitlines()[1:]) == "".join(x.format("gb").splitlines()[1:])
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_read_from_unicode():
with open("pth1.txt", "rU") as f: text = f.read()
assert type(text) == str
x,y = parse( text )
assert x.format()[3314:3324] == '2micron 2µ'
assert x.format()[3314:3324] == u'2micron 2µ'

def test_read_from_file():
a = read("read1.gb")
Expand All @@ -133,10 +133,10 @@ def test_read_from_file():
d.format("gb")
x.format("gb")
y.format("gb")
assert x.format()[3314:3324] == '2micron 2µ'
assert x.features[13].qualifiers['label'][0] == '2micron 2µ'
assert x.format()[3314:3324] == u'2micron 2µ'
assert x.features[13].qualifiers['label'][0] == u'2micron 2µ'
assert str(a.seq).lower()==str(b.seq).lower()==str(c.seq).lower()==str(d.seq).lower()

if __name__ == '__main__':
nose.runmodule(argv=[sys.argv[0], '--nocapture'])
pytest.cmdline.main([__file__, "-v", "-s"])

0 comments on commit d459f1e

Please sign in to comment.