aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/fancy_sleep.py (renamed from scripts/fancy-sleep)10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/fancy-sleep b/scripts/fancy_sleep.py
index 76e24b0..e00839f 100755
--- a/scripts/fancy-sleep
+++ b/scripts/fancy_sleep.py
@@ -160,8 +160,8 @@ def determine_delta(elements,
return timedelta
-def determine_delta_tests():
- 'test determine_delta function'
+def test_determine_delta():
+ 'test determine_delta function (callable with pytest-3)'
assert determine_delta('11'.split()) \
== datetime.timedelta(seconds=11)
assert determine_delta('11s'.split()) \
@@ -180,15 +180,9 @@ def determine_delta_tests():
== datetime.timedelta(days=8, hours=5, minutes=32, seconds=6)
-
-
-
def main():
'function called only when script invoked directly on command line'
- # FIXME: can be done automatically with nose for example ?
- determine_delta_tests()
-
args = docopt.docopt(__doc__)
curtime = datetime.datetime.now()