Skip to content

Commit

Permalink
Added version test
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Aug 7, 2019
1 parent dc4037b commit c7e2803
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygameMenu/version.py
Expand Up @@ -55,6 +55,6 @@ def __str__(self):
patch = property(lambda self: self[2])


ver = "2.0.1"
vernum = PygameMenuVersion(2, 0, 1)
vernum = PygameMenuVersion(2, 0, 2)
ver = str(vernum)
rev = ""
43 changes: 43 additions & 0 deletions test/test_version.py
@@ -0,0 +1,43 @@
# coding=utf-8
"""
pygame-menu
https://github.com/ppizarror/pygame-menu
TEST VERSION
Test version management.
License:
-------------------------------------------------------------------------------
The MIT License (MIT)
Copyright 2017-2019 Pablo Pizarro R. @ppizarror
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------------
"""
from test._utils import *


class VersionTest(unittest.TestCase):

def test_version(self):
"""
Test version.
"""
self.assert_(isinstance(pygameMenu.version.ver, str))
self.assert_(isinstance(repr(pygameMenu.version.vernum), str))
self.assert_(isinstance(str(pygameMenu.version.vernum), str))

0 comments on commit c7e2803

Please sign in to comment.