File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # Gramps Web API - A RESTful API for the Gramps genealogy program
3
+ #
4
+ # Copyright (C) 2021 David Straub
5
+ #
6
+ # This program is free software; you can redistribute it and/or modify
7
+ # it under the terms of the GNU Affero General Public License as published by
8
+ # the Free Software Foundation; either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU Affero General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU Affero General Public License
17
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
18
+ #
19
+
20
+ """Test consistent version numbers."""
21
+
22
+ import unittest
23
+
24
+ import yaml
25
+ from pkg_resources import resource_filename
26
+
27
+ from gramps_webapi import __version__
28
+
29
+
30
+ class TestVersion (unittest .TestCase ):
31
+ """Test the version specifiers are consistent."""
32
+
33
+ def test_version (self ):
34
+ """Test version in setup and apispec are equal."""
35
+ with open (
36
+ resource_filename ("gramps_webapi" , "data/apispec.yaml" )
37
+ ) as file_handle :
38
+ schema = yaml .safe_load (file_handle )
39
+ self .assertEqual (__version__ , schema ["info" ]["version" ])
You can’t perform that action at this time.
0 commit comments