Commit c8949b99 by Jay Zoldak

Disable pylint violation E0611 when importing assert_* methods from nose.tools

Cleaned up files with muliline imports

Cleaned up files that do not use these imports

Misread comment
parent e3810b75
......@@ -2,7 +2,7 @@
#pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_false, assert_equal, assert_regexp_matches
from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611
from common import type_in_codemirror, press_the_notification_button
KEY_CSS = '.key input.policy-key'
......
......@@ -2,7 +2,7 @@
#pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_true, assert_equal, assert_in
from nose.tools import assert_true, assert_equal, assert_in # pylint: disable=E0611
from terrain.steps import reload_the_page
from selenium.common.exceptions import StaleElementReferenceException
......
......@@ -2,7 +2,7 @@
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
from auth.authz import get_user_by_email, get_course_groupname_for_role
from django.conf import settings
......
......@@ -2,7 +2,7 @@
#pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
DATA_LOCATION = 'i4x://edx/templates'
......
......@@ -2,7 +2,7 @@
#pylint: disable=C0111
from lettuce import world
from nose.tools import assert_equal
from nose.tools import assert_equal # pylint: disable=E0611
from terrain.steps import reload_the_page
......
......@@ -3,7 +3,7 @@
from lettuce import world, step
from common import *
from nose.tools import assert_true, assert_false, assert_equal
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611
from logging import getLogger
logger = getLogger(__name__)
......
......@@ -7,7 +7,7 @@ from selenium.webdriver.common.keys import Keys
from common import type_in_codemirror, upload_file
from django.conf import settings
from nose.tools import assert_true, assert_false, assert_equal
from nose.tools import assert_true, assert_false, assert_equal # pylint: disable=E0611
TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
......
......@@ -5,7 +5,7 @@ from lettuce import world, step
from common import create_studio_user
from django.contrib.auth.models import Group
from auth.authz import get_course_groupname_for_role, get_user_by_email
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
PASSWORD = 'test'
EMAIL_EXTENSION = '@edx.org'
......
......@@ -2,7 +2,7 @@
#pylint: disable=C0111
from lettuce import world, step
from nose.tools import assert_equal
from nose.tools import assert_equal # pylint: disable=E0611
from common import type_in_codemirror
DISPLAY_NAME = "Display Name"
......
......@@ -3,7 +3,7 @@
from lettuce import world, step
from common import *
from nose.tools import assert_equal
from nose.tools import assert_equal # pylint: disable=E0611
############### ACTIONS ####################
......
......@@ -3,7 +3,7 @@
from lettuce import world, step
from common import *
from nose.tools import assert_equal
from nose.tools import assert_equal # pylint: disable=E0611
############### ACTIONS ####################
......
import re
from nose.tools import assert_equals, assert_true, assert_false
from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=E0611
from static_replace import (replace_static_urls, replace_course_urls,
_url_replace_regex)
from mock import patch, Mock
......
......@@ -15,7 +15,7 @@ from lettuce import world, step
from .course_helpers import *
from .ui_helpers import *
from lettuce.django import django_url
from nose.tools import assert_equals
from nose.tools import assert_equals # pylint: disable=E0611
from logging import getLogger
logger = getLogger(__name__)
......
......@@ -10,7 +10,7 @@ from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from lettuce.django import django_url
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
@world.absorb
......
from nose.tools import assert_equals, assert_raises, assert_not_equals
from nose.tools import assert_equals, assert_raises, assert_not_equals # pylint: disable=E0611
from xmodule.modulestore import Location
from xmodule.modulestore.exceptions import InvalidLocationError
......
from nose.tools import assert_equals, assert_raises, assert_false, assert_true, assert_not_equals
# pylint: disable=E0611
from nose.tools import assert_equals, assert_raises, assert_false, \
assert_true, assert_not_equals
# pylint: enable=E0611
import pymongo
from uuid import uuid4
......
from nose.tools import assert_equals, assert_raises
from nose.tools import assert_equals, assert_raises # pylint: disable=E0611
from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.modulestore.search import path_to_location
......
from pprint import pprint
from nose.tools import assert_equals, assert_raises, assert_not_equals, assert_false
# pylint: disable=E0611
from nose.tools import assert_equals, assert_raises, \
assert_not_equals, assert_false
# pylint: enable=E0611
import pymongo
from uuid import uuid4
......
import os.path
from nose.tools import assert_raises, assert_equals
from nose.tools import assert_raises, assert_equals # pylint: disable=E0611
from xmodule.course_module import CourseDescriptor
from xmodule.modulestore.xml import XMLModuleStore
......
......@@ -729,7 +729,6 @@ class OpenEndedModuleXmlTest(unittest.TestCase, DummyModulestore):
#Mock a student submitting an assessment
assessment_dict = MockQueryDict()
assessment_dict.update({'assessment': sum(assessment), 'score_list[]': assessment})
#from nose.tools import set_trace; set_trace()
module.handle_ajax("save_assessment", assessment_dict)
task_one_json = json.loads(module.task_states[0])
self.assertEqual(json.loads(task_one_json['child_history'][0]['post_assessment']), assessment)
......@@ -836,4 +835,4 @@ class OpenEndedModuleXmlAttemptTest(unittest.TestCase, DummyModulestore):
#Try to reset, should fail because only 1 attempt is allowed
reset_data = json.loads(module.handle_ajax("reset", {}))
self.assertEqual(reset_data['success'], False)
\ No newline at end of file
self.assertEqual(reset_data['success'], False)
"""Tests for xmodule.util.date_utils"""
from nose.tools import assert_equals, assert_false
from nose.tools import assert_equals, assert_false # pylint: disable=E0611
from xmodule.util.date_utils import get_default_time_display, almost_same_datetime
from datetime import datetime, timedelta, tzinfo
from pytz import UTC
......
from nose.tools import assert_equals
from nose.tools import assert_equals # pylint: disable=E0611
from lxml import etree
from xmodule.stringify import stringify_children
......
......@@ -3,7 +3,7 @@ Tests for the wrapping layer that provides the XBlock API using XModule/Descript
functionality
"""
from nose.tools import assert_equal
from nose.tools import assert_equal # pylint: disable=E0611
from unittest.case import SkipTest
from mock import Mock
......
......@@ -7,7 +7,7 @@ from xmodule.fields import Date, Timedelta
from xmodule.xml_module import XmlDescriptor, serialize_field, deserialize_field
import unittest
from .import get_test_system
from nose.tools import assert_equals
from nose.tools import assert_equals # pylint: disable=E0611
from mock import Mock
......
......@@ -4,7 +4,6 @@
from __future__ import absolute_import
from lettuce import world, step
from nose.tools import assert_equals, assert_in
from django.contrib.auth.models import User
from student.models import CourseEnrollment
from xmodule.modulestore import Location
......
from lettuce import world, step
from nose.tools import assert_equals
@step(u'I click on the tabs then the page title should contain the following titles:')
......
......@@ -2,7 +2,7 @@
#pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_in, assert_equals
from nose.tools import assert_in, assert_equals # pylint: disable=E0611
@step(u'I should see the following Partners in the Partners section')
......
......@@ -3,7 +3,6 @@
from lettuce import step, world
from django.contrib.auth.models import User
from nose.tools import assert_true
@step('I am an unactivated user$')
......
......@@ -3,7 +3,7 @@
from lettuce import world, step
from lettuce.django import django_url
from nose.tools import assert_equals, assert_in
from nose.tools import assert_equals, assert_in # pylint: disable=E0611
from logging import getLogger
logger = getLogger(__name__)
......
......@@ -9,7 +9,6 @@ from lettuce import world, step
from lettuce.django import django_url
from common import i_am_registered_for_the_course
from problems_setup import PROBLEM_DICT, answer_problem, problem_has_answer, add_problem_to_course
from nose.tools import assert_equal
@step(u'I am viewing a "([^"]*)" problem with "([^"]*)" attempt')
......
......@@ -19,7 +19,6 @@ from capa.tests.response_xml_factory import OptionResponseXMLFactory, \
StringResponseXMLFactory, NumericalResponseXMLFactory, \
FormulaResponseXMLFactory, CustomResponseXMLFactory, \
CodeResponseXMLFactory, ChoiceTextResponseXMLFactory
from nose.tools import assert_true
# Factories from capa.tests.response_xml_factory that we will use
......
......@@ -11,7 +11,7 @@ from django.core.management import call_command
from util.testing import UrlResetMixin
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from nose.tools import assert_true, assert_equal
from nose.tools import assert_true, assert_equal # pylint: disable=E0611
from mock import patch
log = logging.getLogger(__name__)
......
......@@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse
from util.testing import UrlResetMixin
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
from mock import patch, Mock
import logging
......
......@@ -12,7 +12,7 @@ from django.test.client import Client
from django.test.utils import override_settings
from django.core.management import call_command
from django.core.urlresolvers import reverse
from nose.tools import assert_true
from nose.tools import assert_true # pylint: disable=E0611
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from licenses.models import CourseSoftware, UserLicense
......
......@@ -100,11 +100,6 @@ ignore-mixin-members=yes
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
# See http://stackoverflow.com/questions/17156240/nose-tools-and-pylint
# Pylint does not like the way that nose tools inspects and makes available
# the assert classes
ignored-classes=nose.tools,nose.tools.trivial
# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
zope=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment