Skip to content

Commit

Permalink
Add docstring to test_version
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Sep 16, 2023
1 parent c988fc2 commit 5839083
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/rez/cli/selftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def __call__(self, parser, namespace, values, option_string=None):

# create argparse entry for each module's unit test
for name, module in sorted(tests):
if not module.__doc__:
raise RuntimeError("Module {0!r} doesn't have a docstring. Please add one.".format(module.__file__))

parser.add_argument(
"--%s" % name, action=AddTestModuleAction, nargs=0,
dest="module_tests", default=[],
Expand Down
10 changes: 6 additions & 4 deletions src/rez/tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project

"""
unit tests for 'rez.version' module
"""
import random
import textwrap
import unittest

from rez.version import Version, AlphanumericVersionToken, \
VersionRange, reverse_sort_key
from rez.version._version import _ReversedComparable
from rez.version import Requirement, RequirementList
from rez.version import VersionError
import random
import textwrap
import unittest



def _print(txt=''):
Expand Down

0 comments on commit 5839083

Please sign in to comment.