-
Notifications
You must be signed in to change notification settings - Fork 12
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 #126 from cta-observatory/move_resources_tests
Move resources and tests out of the package
- Loading branch information
Showing
34 changed files
with
65 additions
and
183 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
19 changes: 4 additions & 15 deletions
19
eventio/iact/tests/test_iact_file.py → tests/iact/test_iact_file.py
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
11 changes: 2 additions & 9 deletions
11
eventio/iact/tests/test_iact_objects.py → tests/iact/test_iact_objects.py
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
34 changes: 4 additions & 30 deletions
34
eventio/simtel/tests/test_simtelfile.py → tests/simtel/test_simtelfile.py
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
15 changes: 3 additions & 12 deletions
15
eventio/tests/test_file_recognition.py → tests/test_file_recognition.py
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
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,36 @@ | ||
import eventio | ||
from os import path | ||
import pkg_resources | ||
|
||
|
||
def test_is_install_folder_a_directory(): | ||
dir_ = path.dirname(eventio.__file__) | ||
assert path.isdir(dir_) | ||
|
||
|
||
def test_can_open_file(): | ||
testfile = 'tests/resources/one_shower.dat' | ||
eventio.EventIOFile(testfile) | ||
|
||
|
||
def test_file_is_iterable(): | ||
testfile = 'tests/resources/one_shower.dat' | ||
f = eventio.EventIOFile(testfile) | ||
for event in f: | ||
pass | ||
|
||
|
||
def test_file_has_correct_types(): | ||
testfile = 'tests/resources/one_shower.dat' | ||
f = eventio.EventIOFile(testfile) | ||
types = [o.header.type for o in f] | ||
|
||
assert types == [1200, 1212, 1201, 1202, 1203, 1204, 1209, 1210] | ||
|
||
|
||
def test_types_gzipped(): | ||
testfile = 'tests/resources/one_shower.dat' | ||
f = eventio.EventIOFile(testfile) | ||
types = [o.header.type for o in f] | ||
|
||
assert types == [1200, 1212, 1201, 1202, 1203, 1204, 1209, 1210] |
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
5 changes: 1 addition & 4 deletions
5
eventio/tests/test_search_utils.py → tests/test_search_utils.py
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
File renamed without changes.