-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from launchableinc/ST-830-support-absolute-ti…
…me-subsetting [ST-830] add time option for absolute time-based subsetting
- Loading branch information
Showing
5 changed files
with
112 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"testPaths": [ | ||
[ | ||
{"type": "class", "name": "com.launchableinc.rocket_car_maven.App2Test"} | ||
], | ||
[ | ||
{ "type": "class", "name": "com.launchableinc.rocket_car_maven.AppTest"} | ||
]], | ||
"session": { | ||
"id": "16" | ||
}, | ||
"goal": {"type": "subset-by-absolute-time", "duration": 5400} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from unittest import TestCase | ||
from launchable.utils.click import convert_to_seconds | ||
|
||
|
||
class DurationTypeTest(TestCase): | ||
def test_convert_to_seconds(self): | ||
self.assertEqual(convert_to_seconds('30s'), 30) | ||
self.assertEqual(convert_to_seconds('5m'), 300) | ||
self.assertEqual(convert_to_seconds('1h30m'), 5400) | ||
self.assertEqual(convert_to_seconds('1d10h15m'), 123300) | ||
self.assertEqual(convert_to_seconds('15m 1d 10h'), 123300) | ||
|
||
with self.assertRaises(ValueError): | ||
convert_to_seconds('1h30k') |