Travis build: 943
This commit is contained in:
7
test/bubble_sort/bubble_sort.py
Normal file
7
test/bubble_sort/bubble_sort.py
Normal file
@ -0,0 +1,7 @@
|
||||
def bubble_sort(lst):
|
||||
for passnum in range(len(lst) - 1, 0, -1):
|
||||
for i in range(passnum):
|
||||
if lst[i] > lst[i + 1]:
|
||||
temp = lst[i]
|
||||
lst[i] = lst[i + 1]
|
||||
lst[i + 1] = temp
|
||||
6
test/bubble_sort/bubble_sort.test.py
Normal file
6
test/bubble_sort/bubble_sort.test.py
Normal file
@ -0,0 +1,6 @@
|
||||
import types,functools
|
||||
from pytape import test
|
||||
from bubble_sort import bubble_sort
|
||||
def bubble_sort_test(t):
|
||||
t.true(isinstance(bubble_sort, (types.BuiltinFunctionType, types.FunctionType, functools.partial)),'<util.read_snippets.<locals>.snippet object at 0x7fc8ea4c6978> is a function')
|
||||
test('Testing bubble_sort',bubble_sort_test)
|
||||
Reference in New Issue
Block a user