Skip to content

Commit

Permalink
add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kepbod committed Nov 16, 2016
1 parent 518658f commit 3957ed4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pydev/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def add(x, y):
return x + y


def minus(x, y):
return x - y


def sort_bed(fn, out):
bed = BedTool(fn)
sorted_bed = bed.sort()
Expand Down
6 changes: 5 additions & 1 deletion tests/test_dev.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import filecmp
from pydev.dev import sort_bed
from pydev.dev import sort_bed, minus


def test_sort_bed():
Expand All @@ -11,3 +11,7 @@ def test_sort_bed():
result = os.path.join(test_data_path, 'data/o.bed')
assert filecmp.cmp(result, out), 'Error!!!'
os.remove(out)


def test_minus():
assert minus(5, 3) == 2, 'Error!!!'

0 comments on commit 3957ed4

Please sign in to comment.