Skip to content

Commit 5ff4944

Browse files
authored
Merge pull request #230 from stac-utils/fix-test-warning
update assert test warnings
2 parents 1c8b4c4 + 42469ce commit 5ff4944

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ stac-validator https://raw.githubusercontent.com/radiantearth/stac-spec/master/e
3232

3333
## Requirements
3434

35-
- Python 3.7+
35+
- Python 3.8+
3636
- Requests
3737
- Click
38-
- Pytest
3938
- Jsonschema
4039

4140
Note: Stac-validator is also used in stac-check which adds linting messages based on the official STAC best practices document.

tests/test_validate_dict.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ def test_correct_validate_dict_return_method():
5656
stac = stac_validator.StacValidate()
5757
with open("tests/test_data/1rc2/extensions-collection/collection.json", "r") as f:
5858
good_stac = json.load(f)
59-
if stac.validate_dict(good_stac) is True:
60-
return True
59+
assert stac.validate_dict(good_stac)
6160

6261

6362
def test_incorrect_validate_dict_return_method():
6463
stac = stac_validator.StacValidate()
6564
with open("tests/test_data/1rc2/extensions-collection/collection.json", "r") as f:
6665
good_stac = json.load(f)
6766
bad_stac = good_stac.pop("type", None)
68-
if stac.validate_dict(bad_stac) is False:
69-
return True
67+
assert stac.validate_dict(bad_stac) is False

0 commit comments

Comments
 (0)