Files
edx-platform/openedx/core/release.py
Kyle McCormick 9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00

33 lines
984 B
Python

"""
Information about the release line of this Open edX code.
"""
import unittest
# The release line: an Open edX release name ("ficus"), or "master".
# This should always be "master" on the master branch, and will be changed
# manually when we start release-line branches, like open-release/ficus.master.
RELEASE_LINE = "master"
def doc_version():
"""The readthedocs.org version name used in documentation references.
Returns a short string like "latest" or "open-release-ficus.master".
"""
if RELEASE_LINE == "master":
return "latest"
else:
return "open-release-{}.master".format(RELEASE_LINE)
def skip_unless_master(func_or_class):
"""
Only run the decorated test for code on master or destined for master.
Use this to skip tests that we expect to fail on a named release branch.
Please use carefully!
"""
return unittest.skipUnless(RELEASE_LINE == "master", "Test often fails on named releases")(func_or_class)