-
Notifications
You must be signed in to change notification settings - Fork 0
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 #11 from Semi-ATE/nerohmot
added more tests
- Loading branch information
Showing
5 changed files
with
34 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Thu Feb 18 22:42:32 2021 | ||
import time | ||
|
||
from Semi_ATE.TnD.TnD import DT, TD | ||
|
||
|
||
try: | ||
_ = DT() | ||
_ = _ - DT(_.epoch + 1) | ||
except: | ||
assert False | ||
else: | ||
assert True | ||
|
||
one = 34858861 | ||
two = 2 * one | ||
|
||
assert TD(one).__str__() == "1 year 1 month 1 week 1 day 1 hour 1 minute 1 second" | ||
assert TD(two).__str__() == "2 years 2 months 2 weeks 2 days 2 hours 2 minutes 2 seconds" | ||
|
||
@author: nerohmot | ||
""" |
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,5 @@ | ||
from Semi_ATE.TnD.TnD import is_date | ||
|
||
assert is_date("32000000") is False | ||
assert is_date("00130000") is False | ||
assert is_date(0) is False |
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,8 @@ | ||
from Semi_ATE.TnD.TnD import is_datecode | ||
|
||
assert is_datecode("00540") is False | ||
assert is_datecode("00XX0") is False | ||
assert is_datecode("00010") is False | ||
assert is_datecode("00018") is False | ||
assert is_datecode("0001X") is False | ||
assert is_datecode(0) is False |
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,3 @@ | ||
from Semi_ATE.TnD.TnD import micronas_time_structure_to_epoch | ||
|
||
assert True |