chore: fix test cases
This commit is contained in:
@@ -13,7 +13,6 @@ not possible to have this LTI multiple times on a single page in LMS.
|
||||
import base64
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import textwrap
|
||||
from unittest import mock
|
||||
from uuid import uuid4
|
||||
|
||||
@@ -3,6 +3,9 @@ A pytest plugin that reports test contexts to coverage running in another proces
|
||||
"""
|
||||
|
||||
import pytest
|
||||
# import requests
|
||||
|
||||
# from pavelib.utils.envs import Env
|
||||
|
||||
|
||||
class RemoteContextPlugin:
|
||||
@@ -13,15 +16,17 @@ class RemoteContextPlugin:
|
||||
self.config = config
|
||||
self.active = config.getoption("pytest-contexts")
|
||||
|
||||
@pytest.hookimpl(tryfirst=True)
|
||||
def pytest_configure(config):
|
||||
config.pluginmanager.register(RemoteContextPlugin(config), "remotecontextplugin")
|
||||
|
||||
def pytest_addoption(parser):
|
||||
group = parser.getgroup("coverage")
|
||||
group.addoption(
|
||||
"--pytest-remote-contexts",
|
||||
action="store_true",
|
||||
dest="pytest-contexts",
|
||||
help="Capture the pytest contexts that coverage is being captured in in another process",
|
||||
)
|
||||
@pytest.hookimpl(tryfirst=True)
|
||||
def pytest_configure(config):
|
||||
config.pluginmanager.register(RemoteContextPlugin(config), "remotecontextplugin")
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
group = parser.getgroup("coverage")
|
||||
group.addoption(
|
||||
"--pytest-remote-contexts",
|
||||
action="store_true",
|
||||
dest="pytest-contexts",
|
||||
help="Capture the pytest contexts that coverage is being captured in in another process",
|
||||
)
|
||||
|
||||
@@ -127,7 +127,7 @@ class TestPaverJavaScriptTestTasks(PaverTestCase):
|
||||
if suite != 'jest-snapshot':
|
||||
karma_config_file = Env.KARMA_CONFIG_FILES[Env.JS_TEST_ID_KEYS.index(suite)]
|
||||
expected_test_tool_command = command_template.format(
|
||||
options=self.EXPECTED_KARMA_OPTIONS.format(
|
||||
options=self.EXPECTED_KARMA_OPTIONS.format(
|
||||
config_file=karma_config_file,
|
||||
single_run='false' if dev_mode else 'true',
|
||||
suite=suite,
|
||||
|
||||
Reference in New Issue
Block a user