diff --git a/cms/djangoapps/contentstore/features/advanced-settings.py b/cms/djangoapps/contentstore/features/advanced-settings.py index 18e179abdb..201ac49e52 100644 --- a/cms/djangoapps/contentstore/features/advanced-settings.py +++ b/cms/djangoapps/contentstore/features/advanced-settings.py @@ -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' diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index e8dcd755a3..1c41eed4d3 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -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 diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 39f28ba249..a6f22db340 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -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 diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 15727dd992..d0c1fd59e7 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -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' diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 606e3dcee8..2971085081 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -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 diff --git a/cms/djangoapps/contentstore/features/course-overview.py b/cms/djangoapps/contentstore/features/course-overview.py index 3fcb134f5b..289dbec308 100644 --- a/cms/djangoapps/contentstore/features/course-overview.py +++ b/cms/djangoapps/contentstore/features/course-overview.py @@ -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__) diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index beaa1fbad4..7004b9f99e 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -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 diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index 8b31d325e5..85044dbbad 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -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' diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index d891789e4a..5e4fe6364d 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -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" diff --git a/cms/djangoapps/contentstore/features/section.py b/cms/djangoapps/contentstore/features/section.py index 3ca8e1676d..3fea8637c6 100644 --- a/cms/djangoapps/contentstore/features/section.py +++ b/cms/djangoapps/contentstore/features/section.py @@ -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 #################### diff --git a/cms/djangoapps/contentstore/features/subsection.py b/cms/djangoapps/contentstore/features/subsection.py index 60a325f550..6d9612d9bd 100644 --- a/cms/djangoapps/contentstore/features/subsection.py +++ b/cms/djangoapps/contentstore/features/subsection.py @@ -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 #################### diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index b1bc05b895..43a199c22c 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -1,6 +1,6 @@ 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 diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index f13b3ff932..c4783d4aca 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -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__) diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index 3ab7e11b47..7d308931b2 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -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 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py index 7e8ba1731b..c190559c73 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py @@ -1,4 +1,4 @@ -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 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index 22d1e40c3f..d4557b3dc0 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -1,4 +1,7 @@ -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 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py index 1e2035075a..36d4a3b8de 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py @@ -1,4 +1,4 @@ -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 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 40b3c6fd83..25ad258668 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -1,6 +1,8 @@ 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 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py index ffbce40874..9e15440f11 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py @@ -1,6 +1,6 @@ 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 diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index c07fd7e187..26c248f71d 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -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) diff --git a/common/lib/xmodule/xmodule/tests/test_date_utils.py b/common/lib/xmodule/xmodule/tests/test_date_utils.py index bacc5de91b..37f30e1b56 100644 --- a/common/lib/xmodule/xmodule/tests/test_date_utils.py +++ b/common/lib/xmodule/xmodule/tests/test_date_utils.py @@ -1,6 +1,6 @@ """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 diff --git a/common/lib/xmodule/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py index 49852ee233..10abaf72f5 100644 --- a/common/lib/xmodule/xmodule/tests/test_stringify.py +++ b/common/lib/xmodule/xmodule/tests/test_stringify.py @@ -1,4 +1,4 @@ -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 diff --git a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py index c98f980c62..0a97728ec7 100644 --- a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py +++ b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py @@ -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 diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index fdcff8ade2..3463140555 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -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 diff --git a/lms/djangoapps/courseware/features/common.py b/lms/djangoapps/courseware/features/common.py index b69dd4c866..349ad7e79e 100644 --- a/lms/djangoapps/courseware/features/common.py +++ b/lms/djangoapps/courseware/features/common.py @@ -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 diff --git a/lms/djangoapps/courseware/features/high-level-tabs.py b/lms/djangoapps/courseware/features/high-level-tabs.py index 4e6ebb70dd..774ac841c5 100644 --- a/lms/djangoapps/courseware/features/high-level-tabs.py +++ b/lms/djangoapps/courseware/features/high-level-tabs.py @@ -1,5 +1,4 @@ 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:') diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index 51c3277e69..bb01982191 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -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') diff --git a/lms/djangoapps/courseware/features/login.py b/lms/djangoapps/courseware/features/login.py index ed788b1bd8..7cdfcd45b6 100644 --- a/lms/djangoapps/courseware/features/login.py +++ b/lms/djangoapps/courseware/features/login.py @@ -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$') diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index f7265be23c..92a597f074 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -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__) diff --git a/lms/djangoapps/courseware/features/problems.py b/lms/djangoapps/courseware/features/problems.py index 997f77c8f2..1465d3614a 100644 --- a/lms/djangoapps/courseware/features/problems.py +++ b/lms/djangoapps/courseware/features/problems.py @@ -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') diff --git a/lms/djangoapps/courseware/features/problems_setup.py b/lms/djangoapps/courseware/features/problems_setup.py index 2ddbbcdeb8..fc2d91e5f1 100644 --- a/lms/djangoapps/courseware/features/problems_setup.py +++ b/lms/djangoapps/courseware/features/problems_setup.py @@ -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 diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index e6ce3b2d25..45b4ecb5cc 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -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__) diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index 2d889722a4..0fc5a14c70 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -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 diff --git a/lms/djangoapps/licenses/tests.py b/lms/djangoapps/licenses/tests.py index a853955c83..4298bec81b 100644 --- a/lms/djangoapps/licenses/tests.py +++ b/lms/djangoapps/licenses/tests.py @@ -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 diff --git a/pylintrc b/pylintrc index 48e301d23d..9525f04362 100644 --- a/pylintrc +++ b/pylintrc @@ -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