Skip to content

Commit 52f3641

Browse files
authored
Merge pull request #346 from gadomski/issues/339-validate-in-tests
Execute the validate method in tests
2 parents 4c7c775 + 295907f commit 52f3641

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
### Fixed
1414

15+
- Validation checks in a few tests ([#346](https://github.com/stac-utils/pystac/pull/346))
16+
1517
### Changed
1618

1719
- API change: The extension API changed significantly. See ([#309](https://github.com/stac-utils/pystac/pull/309)) for more details.

tests/extensions/test_pointcloud.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_count(self):
5757
self.assertEqual(pc_count + 100, pc_item.properties["pc:count"])
5858

5959
# Validate
60-
pc_item.validate
60+
pc_item.validate()
6161

6262
# Cannot test validation errors until the pointcloud schema.json syntax is fixed
6363
# Ensure setting bad count fails validation
@@ -79,7 +79,7 @@ def test_type(self):
7979
self.assertEqual("sonar", pc_item.properties["pc:type"])
8080

8181
# Validate
82-
pc_item.validate
82+
pc_item.validate()
8383

8484
def test_encoding(self):
8585
pc_item = pystac.Item.from_file(self.example_uri)
@@ -94,7 +94,7 @@ def test_encoding(self):
9494
self.assertEqual("binary", pc_item.properties["pc:encoding"])
9595

9696
# Validate
97-
pc_item.validate
97+
pc_item.validate()
9898

9999
def test_schemas(self):
100100
pc_item = pystac.Item.from_file(self.example_uri)
@@ -112,7 +112,7 @@ def test_schemas(self):
112112
)
113113

114114
# Validate
115-
pc_item.validate
115+
pc_item.validate()
116116

117117
def test_statistics(self):
118118
pc_item = pystac.Item.from_file(self.example_uri)
@@ -158,7 +158,7 @@ def test_density(self):
158158
PointcloudExtension.ext(pc_item).density = density
159159
self.assertEqual(density, pc_item.properties["pc:density"])
160160
# Validate
161-
pc_item.validate
161+
pc_item.validate()
162162

163163
def test_pointcloud_schema(self):
164164
props: Dict[str, Any] = {

tests/extensions/test_projection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_epsg(self):
140140
self.assertEqual(ProjectionExtension.ext(asset_no_prop).epsg, 8888)
141141

142142
# Validate
143-
proj_item.validate
143+
proj_item.validate()
144144

145145
def test_wkt2(self):
146146
proj_item = pystac.Item.from_file(self.example_uri)

0 commit comments

Comments
 (0)