Skip to content

Commit

Permalink
bubble sort in scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Mar 31, 2015
1 parent 82eb2c8 commit 4f4f04e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/code_beatrix/scratchs/__init__.py
Expand Up @@ -4,22 +4,12 @@

#from .example_echiquier import check as check1


def check1():
"""
basic checkings
"""
dirname = os.path.dirname(__file__)
f1 = os.path.exists(dirname, "echiquier.sb2")
if not os.path.exists(f1):
raise FileNotFoundError(f1)
f0 = os.path.exists(dirname, "echiquier0.sb2")
if not os.path.exists(f0):
raise FileNotFoundError(f0)

from .example_echiquier import check_echiquier
from .example_tri import check_tri

def check():
"""
run checking functions
"""
check1()
check_echiquier()
check_tri()
15 changes: 15 additions & 0 deletions src/code_beatrix/scratchs/example_echiquier/__init__.py
@@ -0,0 +1,15 @@
"""
basic checking
"""

def check_echiquier():
"""
basic checkings
"""
dirname = os.path.dirname(__file__)
f1 = os.path.exists(dirname, "echiquier.sb2")
if not os.path.exists(f1):
raise FileNotFoundError(f1)
f0 = os.path.exists(dirname, "echiquier0.sb2")
if not os.path.exists(f0):
raise FileNotFoundError(f0)
12 changes: 12 additions & 0 deletions src/code_beatrix/scratchs/example_tri/__init__.py
@@ -0,0 +1,12 @@
"""
basic checking
"""

def check_tri():
"""
basic checkings
"""
dirname = os.path.dirname(__file__)
f1 = os.path.exists(dirname, "bubble_sort.sb2")
if not os.path.exists(f1):
raise FileNotFoundError(f1)
Binary file not shown.

0 comments on commit 4f4f04e

Please sign in to comment.