diff options
author | VG <vg@devys.org> | 2017-08-24 19:06:05 +0200 |
---|---|---|
committer | VG <vg@devys.org> | 2017-08-24 19:06:05 +0200 |
commit | a55623c983225f381e1dad27cbc60c8c0ab1574c (patch) | |
tree | f2b9d0955006e35086d9ea111ece7052b9062095 | |
parent | 6ccc66d81bafb209063441023717b4a1f28f0162 (diff) | |
download | scripts-a55623c983225f381e1dad27cbc60c8c0ab1574c.tar.gz scripts-a55623c983225f381e1dad27cbc60c8c0ab1574c.tar.bz2 scripts-a55623c983225f381e1dad27cbc60c8c0ab1574c.zip |
rename test function for pytest-3 compatibility
-rwxr-xr-x | scripts/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() |