-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dbbe29
commit be624f5
Showing
6 changed files
with
196 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ | |
segy_patch = dc.spool(path)[0] | ||
""" | ||
|
||
from .core import SegyV2 | ||
from .core import SegyV1_0, SegyV2_0, SegyV2_1 |
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
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 +1,27 @@ | ||
"""Tests for SEGY format.""" | ||
|
||
import pytest | ||
|
||
from dascore.io.segy.core import SegyV1_0 | ||
|
||
|
||
class TestSegy: | ||
"""Tests for SEGY format.""" | ||
|
||
@pytest.fixture(scope="class") | ||
def small_file(self, tmp_path_factory): | ||
"""Creates a small file with only a few bytes.""" | ||
parent = tmp_path_factory.mktemp("small_file") | ||
path = parent / "test_file.segy" | ||
with path.open("wb") as f: | ||
f.write(b"abd") | ||
return path | ||
|
||
def test_small_file(self, small_file): | ||
""" | ||
Ensure a file that is too small to contain segy header doesn't throw | ||
an error. | ||
""" | ||
segy = SegyV1_0() | ||
out = segy.get_format(small_file) | ||
assert out is False # we actually want to make sure its False. |