| |
@@ -0,0 +1,35 @@
|
| |
+ # Copyright ⓒ 2016 Red Hat, Inc.
|
| |
+ # This file is part of fegistry.
|
| |
+ #
|
| |
+ # fegistry is free software: you can redistribute it and/or modify
|
| |
+ # it under the terms of the GNU General Public License as published by
|
| |
+ # the Free Software Foundation, either version 3 of the License, or
|
| |
+ # (at your option) any later version.
|
| |
+ #
|
| |
+ # fegistry is distributed in the hope that it will be useful,
|
| |
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| |
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| |
+ # GNU General Public License for more details.
|
| |
+ #
|
| |
+ # You should have received a copy of the GNU General Public License
|
| |
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
| |
+ """This test suite contains tests on fegistry.__init__."""
|
| |
+
|
| |
+ import imp
|
| |
+
|
| |
+ import unittest
|
| |
+
|
| |
+ import fegistry
|
| |
+
|
| |
+
|
| |
+ # Since setup.py imports fegistry to get the version before launching nose/coverage, coverage thinks
|
| |
+ # we are missing coverage on fegistry's top level __init__.py. We can use imp.reload() to make
|
| |
+ # coverage happy. Plus, why not assert that the __version__ is a string while we're at it?
|
| |
+ imp.reload(fegistry)
|
| |
+
|
| |
+
|
| |
+ class TestVersion(unittest.TestCase):
|
| |
+ """This test class contains tests on the __version__ attribute."""
|
| |
+ def test___version__(self):
|
| |
+ """Make sure the version is a string."""
|
| |
+ self.assertTrue(isinstance(fegistry.__version__, str))
|
| |
s/Foobar/fegistry