-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial test code EPIC time convert tests * Update EPIC_timeconvert.py mistype * Update test_epic.py more spacing - isort * Update test_epic.py more white space
- Loading branch information
1 parent
55bd27a
commit 3aa4b7e
Showing
3 changed files
with
27 additions
and
29 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,23 @@ | ||
import datetime | ||
|
||
import pytest | ||
from EcoFOCIpy.epic import EPIC_timeconvert as EPIC | ||
|
||
|
||
class TestClassEPICTime: | ||
def test_1d(self): | ||
testdate = EPIC.EPIC2Datetime([2440000,],[43200000+3600*1000,]) | ||
assert testdate == [datetime.datetime(1968, 5, 23, 13, 0)] | ||
|
||
def test_2d(self): | ||
testdate = EPIC.EPIC2Datetime([2440000,2450000],[43200000,0]) | ||
assert testdate == [datetime.datetime(1968, 5, 23, 12, 0), datetime.datetime(1995, 10, 9, 0, 0)] | ||
|
||
def test_1d_EPIC(self): | ||
testdate = EPIC.Datetime2EPIC(EPIC.EPIC2Datetime([2440000,],[43200000+3600*1000,])) | ||
assert testdate == ([2440000], [46800000]) | ||
|
||
def test_2d_EPIC(self): | ||
testdate = EPIC.Datetime2EPIC(EPIC.EPIC2Datetime([2440000,2450000],[43200000,0])) | ||
assert testdate == ([2440000,2450000],[43200000,0]) | ||
|