chore: fix comments, remove un-used variable

This commit is contained in:
salman2013
2023-10-12 20:11:25 +05:00
parent 8f97ac90cf
commit 2a4ce5fa48
3 changed files with 3 additions and 19 deletions

View File

@@ -12,7 +12,6 @@ from pavelib.utils.envs import Env
from pavelib.utils.test.utils import MINIMUM_FIREFOX_VERSION, check_firefox_version
@unittest.skipIf(Env.USING_DOCKER, 'Firefox version check works differently under Docker Devstack')
class TestUtils(unittest.TestCase):
"""
Test utils.py under pavelib/utils/test

View File

@@ -354,13 +354,3 @@ def install_prereqs():
def log_installed_python_prereqs():
""" Logs output of pip freeze for debugging. """
sh("pip freeze > {}".format(Env.GEN_LOG_DIR + "/pip_freeze.log"))
def print_devstack_warning(): # lint-amnesty, pylint: disable=missing-function-docstring
if Env.USING_DOCKER: # pragma: no cover
print("********************************************************************************")
print("* WARNING: Mac users should run this from both the lms and studio shells")
print("* in docker devstack to avoid startup errors that kill your CPU.")
print("* For more details, see:")
print("* https://github.com/openedx/devstack#docker-is-using-lots-of-cpu-time-when-it-should-be-idle")
print("********************************************************************************")

View File

@@ -77,23 +77,18 @@ class Env:
PRINT_SETTINGS_LOG_FILE = GEN_LOG_DIR / "print_settings.log"
# Detect if in a Docker container, and if so which one
SERVER_HOST = '0.0.0.0'
USING_DOCKER = SERVER_HOST != '0.0.0.0'
DEVSTACK_SETTINGS = 'devstack_docker' if USING_DOCKER else 'devstack'
DEVSTACK_SETTINGS = 'devstack'
TEST_SETTINGS = 'test'
# Mongo databases that will be dropped before/after the tests run
MONGO_HOST = 'edx.devstack.mongo' if USING_DOCKER else 'localhost'
MONGO_HOST = 'localhost'
# Test Ids Directory
TEST_DIR = REPO_ROOT / ".testids"
# Configured browser to use for the js test suites
SELENIUM_BROWSER = os.environ.get('SELENIUM_BROWSER', 'firefox')
if USING_DOCKER:
KARMA_BROWSER = 'ChromeDocker' if SELENIUM_BROWSER == 'chrome' else 'FirefoxDocker'
else:
KARMA_BROWSER = 'FirefoxNoUpdates'
KARMA_BROWSER = 'FirefoxNoUpdates'
# Files used to run each of the js test suites
# TODO: Store this as a dict. Order seems to matter for some