diff options
| author | Alexander Neben <alexander.neben@mongodb.com> | 2022-09-02 21:56:05 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-02 22:55:09 +0000 |
| commit | 97ac02fa506b4a9e7e0729b9c492bc4ace79499c (patch) | |
| tree | 975a4d92d9a33f3eb49920daf4ffe8deba3f84b7 /buildscripts/resmokelib/testing | |
| parent | d4d4a26801f7b3033cd6103b6a317cc547ee142c (diff) | |
| download | mongo-97ac02fa506b4a9e7e0729b9c492bc4ace79499c.tar.gz | |
SERVER-68593 Disable low value python warnings
Diffstat (limited to 'buildscripts/resmokelib/testing')
35 files changed, 116 insertions, 142 deletions
diff --git a/buildscripts/resmokelib/testing/executor.py b/buildscripts/resmokelib/testing/executor.py index 22c1ffa1593..5d7cff38733 100644 --- a/buildscripts/resmokelib/testing/executor.py +++ b/buildscripts/resmokelib/testing/executor.py @@ -19,7 +19,7 @@ from buildscripts.resmokelib.testing.queue_element import queue_elem_factory, Qu from buildscripts.resmokelib.utils import queue as _queue -class TestSuiteExecutor(object): # pylint: disable=too-many-instance-attributes +class TestSuiteExecutor(object): """Execute a test suite. Responsible for setting up and tearing down the fixtures that the @@ -28,9 +28,8 @@ class TestSuiteExecutor(object): # pylint: disable=too-many-instance-attributes _TIMEOUT = 24 * 60 * 60 # =1 day (a long time to have tests run) - def __init__( # pylint: disable=too-many-arguments - self, exec_logger, suite, config=None, fixture=None, hooks=None, archive_instance=None, - archive=None): + def __init__(self, exec_logger, suite, config=None, fixture=None, hooks=None, + archive_instance=None, archive=None): """Initialize the TestSuiteExecutor with the test suite to run.""" self.logger = exec_logger @@ -66,7 +65,7 @@ class TestSuiteExecutor(object): # pylint: disable=too-many-instance-attributes """ return [self._make_job(job_num) for job_num in range(num_jobs)] - def run(self): # pylint: disable=too-many-branches + def run(self): """Execute the test suite. Any exceptions that occur during setting up or tearing down a diff --git a/buildscripts/resmokelib/testing/fixtures/fixturelib.py b/buildscripts/resmokelib/testing/fixtures/fixturelib.py index 78bda3c8c68..e2ff39d983c 100644 --- a/buildscripts/resmokelib/testing/fixtures/fixturelib.py +++ b/buildscripts/resmokelib/testing/fixtures/fixturelib.py @@ -15,8 +15,6 @@ from buildscripts.resmokelib.testing.fixtures import _builder class FixtureLib: """Class that exposes the resmokelib API that fixtures can use.""" - # pylint: disable=no-self-use - ################# # Logger tools # ################# @@ -45,7 +43,7 @@ class FixtureLib: """Build fixtures by calling builder API.""" return _builder.make_fixture(class_name, logger, job_num, *args, **kwargs) - def mongod_program(self, logger, job_num, executable, process_kwargs, mongod_options): # pylint: disable=too-many-arguments + def mongod_program(self, logger, job_num, executable, process_kwargs, mongod_options): """ Return a Process instance that starts mongod arguments constructed from 'mongod_options'. @@ -58,12 +56,12 @@ class FixtureLib: mongod_options) def mongos_program(self, logger, job_num, executable=None, process_kwargs=None, - mongos_options=None): # pylint: disable=too-many-arguments + mongos_options=None): """Return a Process instance that starts a mongos with arguments constructed from 'kwargs'.""" return core.programs.mongos_program(logger, job_num, executable, process_kwargs, mongos_options) - def generic_program(self, logger, args, process_kwargs=None, **kwargs): # pylint: disable=too-many-arguments + def generic_program(self, logger, args, process_kwargs=None, **kwargs): """Return a Process instance that starts an arbitrary executable. The executable arguments are constructed from 'kwargs'. @@ -112,7 +110,7 @@ class FixtureLib: return original -class _FixtureConfig(object): # pylint: disable=too-many-instance-attributes +class _FixtureConfig(object): """Class that stores fixture configuration info.""" def __init__(self): diff --git a/buildscripts/resmokelib/testing/fixtures/interface.py b/buildscripts/resmokelib/testing/fixtures/interface.py index 8adbe7425f7..57d22f87ec6 100644 --- a/buildscripts/resmokelib/testing/fixtures/interface.py +++ b/buildscripts/resmokelib/testing/fixtures/interface.py @@ -148,11 +148,11 @@ class Fixture(object, metaclass=registry.make_registry_metaclass(_FIXTURES)): # """ pass - def is_running(self): # pylint: disable=no-self-use + def is_running(self): """Return true if the fixture is still operating and more tests and can be run.""" return True - def get_node_info(self): # pylint: disable=no-self-use + def get_node_info(self): """Return a list of NodeInfo objects.""" return [] diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py index a43b72a6d84..d9c463e29c9 100644 --- a/buildscripts/resmokelib/testing/fixtures/replicaset.py +++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py @@ -37,17 +37,16 @@ def compare_optime(optime1, optime2): return compare_timestamp(optime1["ts"], optime2["ts"]) -class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-instance-attributes, too-many-public-methods +class ReplicaSetFixture(interface.ReplFixture): """Fixture which provides JSTests with a replica set to run against.""" - def __init__( # pylint: disable=too-many-arguments, too-many-locals - self, logger, job_num, fixturelib, mongod_executable=None, mongod_options=None, - dbpath_prefix=None, preserve_dbpath=False, num_nodes=2, start_initial_sync_node=False, - write_concern_majority_journal_default=None, auth_options=None, - replset_config_options=None, voting_secondaries=True, all_nodes_electable=False, - use_replica_set_connection_string=None, linear_chain=False, default_read_concern=None, - default_write_concern=None, shard_logging_prefix=None, replicaset_logging_prefix=None, - replset_name=None): + def __init__(self, logger, job_num, fixturelib, mongod_executable=None, mongod_options=None, + dbpath_prefix=None, preserve_dbpath=False, num_nodes=2, + start_initial_sync_node=False, write_concern_majority_journal_default=None, + auth_options=None, replset_config_options=None, voting_secondaries=True, + all_nodes_electable=False, use_replica_set_connection_string=None, + linear_chain=False, default_read_concern=None, default_write_concern=None, + shard_logging_prefix=None, replicaset_logging_prefix=None, replset_name=None): """Initialize ReplicaSetFixture.""" interface.ReplFixture.__init__(self, logger, job_num, fixturelib, @@ -110,7 +109,7 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst self.initial_sync_node = None self.initial_sync_node_idx = -1 - def setup(self): # pylint: disable=too-many-branches,too-many-statements,too-many-locals + def setup(self): """Set up the replica set.""" # Version-agnostic options for mongod/s can be set here. diff --git a/buildscripts/resmokelib/testing/fixtures/shard_split.py b/buildscripts/resmokelib/testing/fixtures/shard_split.py index 04f94f9843f..ce80daf270c 100644 --- a/buildscripts/resmokelib/testing/fixtures/shard_split.py +++ b/buildscripts/resmokelib/testing/fixtures/shard_split.py @@ -23,13 +23,13 @@ def _teardown_and_clean_node(node): shutil.rmtree(node.get_dbpath_prefix(), ignore_errors=False) -class ShardSplitFixture(interface.MultiClusterFixture): # pylint: disable=too-many-instance-attributes +class ShardSplitFixture(interface.MultiClusterFixture): """Fixture which provides JSTests with a replica set and recipient nodes to run splits against.""" AWAIT_REPL_TIMEOUT_MINS = 5 AWAIT_REPL_TIMEOUT_FOREVER_MINS = 24 * 60 - def __init__( # pylint: disable=too-many-arguments,too-many-locals + def __init__( self, logger, job_num, diff --git a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py index 84574900e34..7de0c37ba08 100644 --- a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py +++ b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py @@ -11,7 +11,7 @@ import buildscripts.resmokelib.testing.fixtures.interface as interface import buildscripts.resmokelib.testing.fixtures.external as external -class ShardedClusterFixture(interface.Fixture): # pylint: disable=too-many-instance-attributes +class ShardedClusterFixture(interface.Fixture): """Fixture which provides JSTests with a sharded cluster to run against.""" _CONFIGSVR_REPLSET_NAME = "config-rs" @@ -19,12 +19,12 @@ class ShardedClusterFixture(interface.Fixture): # pylint: disable=too-many-inst AWAIT_SHARDING_INITIALIZATION_TIMEOUT_SECS = 60 - def __init__( # pylint: disable=too-many-arguments,too-many-locals - self, logger, job_num, fixturelib, mongos_executable=None, mongos_options=None, - mongod_executable=None, mongod_options=None, dbpath_prefix=None, preserve_dbpath=False, - num_shards=1, num_rs_nodes_per_shard=1, num_mongos=1, enable_sharding=None, - enable_balancer=True, enable_autosplit=True, auth_options=None, configsvr_options=None, - shard_options=None, cluster_logging_prefix=None): + def __init__(self, logger, job_num, fixturelib, mongos_executable=None, mongos_options=None, + mongod_executable=None, mongod_options=None, dbpath_prefix=None, + preserve_dbpath=False, num_shards=1, num_rs_nodes_per_shard=1, num_mongos=1, + enable_sharding=None, enable_balancer=True, enable_autosplit=True, + auth_options=None, configsvr_options=None, shard_options=None, + cluster_logging_prefix=None): """Initialize ShardedClusterFixture with different options for the cluster processes.""" interface.Fixture.__init__(self, logger, job_num, fixturelib, dbpath_prefix=dbpath_prefix) @@ -429,7 +429,6 @@ class ExternalShardedClusterFixture(external.ExternalFixture, ShardedClusterFixt class _MongoSFixture(interface.Fixture): """Fixture which provides JSTests with a mongos to connect to.""" - # pylint: disable=too-many-arguments def __init__(self, logger, job_num, fixturelib, dbpath_prefix, mongos_executable=None, mongos_options=None, add_feature_flags=False): """Initialize _MongoSFixture.""" @@ -542,7 +541,6 @@ class _MongoSFixture(interface.Fixture): exit_code = self.mongos.wait() # Python's subprocess module returns negative versions of system calls. - # pylint: disable=invalid-unary-operand-type if exit_code == 0 or (mode is not None and exit_code == -(mode.value)): self.logger.info("Successfully stopped the mongos on port {:d}".format(self.port)) else: diff --git a/buildscripts/resmokelib/testing/fixtures/standalone.py b/buildscripts/resmokelib/testing/fixtures/standalone.py index 03dc436e15d..5cdf70059e1 100644 --- a/buildscripts/resmokelib/testing/fixtures/standalone.py +++ b/buildscripts/resmokelib/testing/fixtures/standalone.py @@ -17,9 +17,8 @@ import buildscripts.resmokelib.testing.fixtures.interface as interface class MongoDFixture(interface.Fixture): """Fixture which provides JSTests with a standalone mongod to run against.""" - def __init__( # pylint: disable=too-many-arguments - self, logger, job_num, fixturelib, mongod_executable=None, mongod_options=None, - add_feature_flags=False, dbpath_prefix=None, preserve_dbpath=False, port=None): + def __init__(self, logger, job_num, fixturelib, mongod_executable=None, mongod_options=None, + add_feature_flags=False, dbpath_prefix=None, preserve_dbpath=False, port=None): """Initialize MongoDFixture with different options for the mongod process.""" interface.Fixture.__init__(self, logger, job_num, fixturelib, dbpath_prefix=dbpath_prefix) self.mongod_options = self.fixturelib.make_historic( @@ -149,7 +148,6 @@ class MongoDFixture(interface.Fixture): exit_code = self.mongod.wait() # Python's subprocess module returns negative versions of system calls. - # pylint: disable=invalid-unary-operand-type if exit_code == 0 or (mode is not None and exit_code == -(mode.value)): self.logger.info("Successfully stopped the mongod on port {:d}.".format(self.port)) else: @@ -215,8 +213,8 @@ class MongodLauncher(object): self.fixturelib = fixturelib self.config = fixturelib.get_config() - def launch_mongod_program( # pylint: disable=too-many-branches,too-many-statements,too-many-arguments - self, logger, job_num, executable=None, process_kwargs=None, mongod_options=None): + def launch_mongod_program(self, logger, job_num, executable=None, process_kwargs=None, + mongod_options=None): """ Return a Process instance that starts mongod arguments constructed from 'mongod_options'. diff --git a/buildscripts/resmokelib/testing/fixtures/talk_directly_to_shardsvrs.py b/buildscripts/resmokelib/testing/fixtures/talk_directly_to_shardsvrs.py index a241006f679..87ee370d5af 100644 --- a/buildscripts/resmokelib/testing/fixtures/talk_directly_to_shardsvrs.py +++ b/buildscripts/resmokelib/testing/fixtures/talk_directly_to_shardsvrs.py @@ -9,16 +9,16 @@ import buildscripts.resmokelib.testing.fixtures.interface as interface from buildscripts.resmokelib.testing.fixtures.fixturelib import FixtureLib -class TalkDirectlyToShardsvrsFixture(interface.MultiClusterFixture): # pylint: disable=too-many-instance-attributes +class TalkDirectlyToShardsvrsFixture(interface.MultiClusterFixture): """Fixture which provides JSTests with a set of shardsvrs and a config svr set to run against.""" - def __init__( # pylint: disable=too-many-arguments,too-many-locals - self, logger, job_num, fixturelib, common_mongod_options=None, dbpath_prefix=None, - preserve_dbpath=False, num_replica_sets=1, num_nodes_per_replica_set=3, - start_initial_sync_node=False, write_concern_majority_journal_default=None, - auth_options=None, replset_config_options=None, voting_secondaries=True, - all_nodes_electable=False, use_replica_set_connection_string=None, linear_chain=False, - mixed_bin_versions=None, default_read_concern=None, default_write_concern=None): + def __init__(self, logger, job_num, fixturelib, common_mongod_options=None, dbpath_prefix=None, + preserve_dbpath=False, num_replica_sets=1, num_nodes_per_replica_set=3, + start_initial_sync_node=False, write_concern_majority_journal_default=None, + auth_options=None, replset_config_options=None, voting_secondaries=True, + all_nodes_electable=False, use_replica_set_connection_string=None, + linear_chain=False, mixed_bin_versions=None, default_read_concern=None, + default_write_concern=None): """Initialize TalkDirectlyToShardsvrsFixture with different options for the replica set processes.""" interface.MultiClusterFixture.__init__(self, logger, job_num, fixturelib, diff --git a/buildscripts/resmokelib/testing/fixtures/tenant_migration.py b/buildscripts/resmokelib/testing/fixtures/tenant_migration.py index beb48e72f09..1518bdb792e 100644 --- a/buildscripts/resmokelib/testing/fixtures/tenant_migration.py +++ b/buildscripts/resmokelib/testing/fixtures/tenant_migration.py @@ -6,17 +6,16 @@ import buildscripts.resmokelib.testing.fixtures.interface as interface from buildscripts.resmokelib.testing.fixtures.fixturelib import FixtureLib -class TenantMigrationFixture(interface.MultiClusterFixture): # pylint: disable=too-many-instance-attributes +class TenantMigrationFixture(interface.MultiClusterFixture): """Fixture which provides JSTests with a set of replica sets to run tenant migration against.""" - def __init__( # pylint: disable=too-many-arguments,too-many-locals - self, logger, job_num, fixturelib, common_mongod_options=None, per_mongod_options=None, - dbpath_prefix=None, preserve_dbpath=False, num_replica_sets=1, - num_nodes_per_replica_set=2, start_initial_sync_node=False, - write_concern_majority_journal_default=None, auth_options=None, - replset_config_options=None, voting_secondaries=True, all_nodes_electable=False, - use_replica_set_connection_string=None, linear_chain=False, mixed_bin_versions=None, - default_read_concern=None, default_write_concern=None): + def __init__(self, logger, job_num, fixturelib, common_mongod_options=None, + per_mongod_options=None, dbpath_prefix=None, preserve_dbpath=False, + num_replica_sets=1, num_nodes_per_replica_set=2, start_initial_sync_node=False, + write_concern_majority_journal_default=None, auth_options=None, + replset_config_options=None, voting_secondaries=True, all_nodes_electable=False, + use_replica_set_connection_string=None, linear_chain=False, + mixed_bin_versions=None, default_read_concern=None, default_write_concern=None): """Initialize TenantMigrationFixture with different options for the replica set processes.""" interface.MultiClusterFixture.__init__(self, logger, job_num, fixturelib, diff --git a/buildscripts/resmokelib/testing/fixtures/yesfixture.py b/buildscripts/resmokelib/testing/fixtures/yesfixture.py index cf2780ded17..ca594fc52dc 100644 --- a/buildscripts/resmokelib/testing/fixtures/yesfixture.py +++ b/buildscripts/resmokelib/testing/fixtures/yesfixture.py @@ -9,7 +9,7 @@ from buildscripts.resmokelib.testing.fixtures.fixturelib import FixtureLib class YesFixture(interface.Fixture): # pylint: disable=abstract-method """Fixture which spawns several 'yes' executables to generate lots of log messages.""" - def __init__(self, logger, job_num, fixturelib, num_instances=1, message_length=100): # pylint: disable=too-many-arguments + def __init__(self, logger, job_num, fixturelib, num_instances=1, message_length=100): """Initialize YesFixture.""" interface.Fixture.__init__(self, logger, job_num, fixturelib) diff --git a/buildscripts/resmokelib/testing/hooks/antithesis_logging.py b/buildscripts/resmokelib/testing/hooks/antithesis_logging.py index 49b1a357cc5..8df7da69dc8 100644 --- a/buildscripts/resmokelib/testing/hooks/antithesis_logging.py +++ b/buildscripts/resmokelib/testing/hooks/antithesis_logging.py @@ -4,7 +4,7 @@ from time import sleep from buildscripts.resmokelib.testing.hooks import interface -class AntithesisLogging(interface.Hook): # pylint: disable=too-many-instance-attributes +class AntithesisLogging(interface.Hook): """Prints antithesis commands before & after test run.""" DESCRIPTION = "Prints antithesis commands before & after test run." diff --git a/buildscripts/resmokelib/testing/hooks/background_job.py b/buildscripts/resmokelib/testing/hooks/background_job.py index 92dbb5437a4..b01196ba462 100644 --- a/buildscripts/resmokelib/testing/hooks/background_job.py +++ b/buildscripts/resmokelib/testing/hooks/background_job.py @@ -6,7 +6,7 @@ import threading from buildscripts.resmokelib.testing.hooks import jsfile -class _BackgroundJob(threading.Thread): # pylint: disable=too-many-instance-attributes +class _BackgroundJob(threading.Thread): """A thread for running a JS file while a test is running.""" def __init__(self, thread_name): diff --git a/buildscripts/resmokelib/testing/hooks/cleanup_concurrency_workloads.py b/buildscripts/resmokelib/testing/hooks/cleanup_concurrency_workloads.py index 3f7f715a319..2ad144e5ec8 100644 --- a/buildscripts/resmokelib/testing/hooks/cleanup_concurrency_workloads.py +++ b/buildscripts/resmokelib/testing/hooks/cleanup_concurrency_workloads.py @@ -20,8 +20,8 @@ class CleanupConcurrencyWorkloads(interface.Hook): IS_BACKGROUND = False - def __init__( #pylint: disable=too-many-arguments - self, hook_logger, fixture, exclude_dbs=None, same_collection=False, same_db=False): + def __init__(self, hook_logger, fixture, exclude_dbs=None, same_collection=False, + same_db=False): """Initialize CleanupConcurrencyWorkloads.""" description = "CleanupConcurrencyWorkloads drops all databases in the fixture" interface.Hook.__init__(self, hook_logger, fixture, description) diff --git a/buildscripts/resmokelib/testing/hooks/cpp_libfuzzer.py b/buildscripts/resmokelib/testing/hooks/cpp_libfuzzer.py index c5f9c42248e..1053191a64c 100644 --- a/buildscripts/resmokelib/testing/hooks/cpp_libfuzzer.py +++ b/buildscripts/resmokelib/testing/hooks/cpp_libfuzzer.py @@ -6,7 +6,7 @@ from buildscripts.resmokelib import core from buildscripts.resmokelib.testing.hooks import interface -class LibfuzzerHook(interface.Hook): # pylint: disable=too-many-instance-attributes +class LibfuzzerHook(interface.Hook): """Merges inputs after a fuzzer run.""" DESCRIPTION = "Merges inputs after a fuzzer run" diff --git a/buildscripts/resmokelib/testing/hooks/drop_sharded_collections.py b/buildscripts/resmokelib/testing/hooks/drop_sharded_collections.py index 6cc7d66e3dc..db0c3e82534 100644 --- a/buildscripts/resmokelib/testing/hooks/drop_sharded_collections.py +++ b/buildscripts/resmokelib/testing/hooks/drop_sharded_collections.py @@ -13,10 +13,9 @@ class DropShardedCollections(jsfile.JSHook): IS_BACKGROUND = False - def __init__( # pylint: disable=super-init-not-called - self, hook_logger, fixture, shell_options=None): + def __init__(self, hook_logger, fixture, shell_options=None): """.""" description = "Drop all sharded collections" js_filename = os.path.join("jstests", "hooks", "drop_sharded_collections.js") - jsfile.JSHook.__init__( # pylint: disable=non-parent-init-called - self, hook_logger, fixture, js_filename, description, shell_options=shell_options) + jsfile.JSHook.__init__(self, hook_logger, fixture, js_filename, description, + shell_options=shell_options) diff --git a/buildscripts/resmokelib/testing/hooks/enable_spurious_write_conflicts.py b/buildscripts/resmokelib/testing/hooks/enable_spurious_write_conflicts.py index 913d67f8580..70389b9cc3f 100644 --- a/buildscripts/resmokelib/testing/hooks/enable_spurious_write_conflicts.py +++ b/buildscripts/resmokelib/testing/hooks/enable_spurious_write_conflicts.py @@ -15,8 +15,7 @@ class EnableSpuriousWriteConflicts(interface.Hook): IS_BACKGROUND = False - def __init__( # pylint: disable=too-many-arguments - self, hook_logger, fixture, shell_options=None): + def __init__(self, hook_logger, fixture, shell_options=None): """Initialize ToggleWriteConflicts.""" super().__init__(hook_logger, fixture, "TogglesWTWriteConflictExceptions") self._enable_js_filename = os.path.join("jstests", "hooks", "enable_write_conflicts.js") diff --git a/buildscripts/resmokelib/testing/hooks/initialsync.py b/buildscripts/resmokelib/testing/hooks/initialsync.py index 48a0e5f30df..29d43c9c9ff 100644 --- a/buildscripts/resmokelib/testing/hooks/initialsync.py +++ b/buildscripts/resmokelib/testing/hooks/initialsync.py @@ -63,8 +63,7 @@ class BackgroundInitialSyncTestCase(jsfile.DynamicJSTestCase): INTERRUPTED_DUE_TO_REPL_STATE_CHANGE = 11602 INTERRUPTED_DUE_TO_STORAGE_CHANGE = 355 - def __init__( # pylint: disable=too-many-arguments - self, logger, test_name, description, base_test_name, hook, shell_options=None): + def __init__(self, logger, test_name, description, base_test_name, hook, shell_options=None): """Initialize BackgroundInitialSyncTestCase.""" jsfile.DynamicJSTestCase.__init__(self, logger, test_name, description, base_test_name, hook, self.JS_FILENAME, shell_options) @@ -198,8 +197,7 @@ class IntermediateInitialSyncTestCase(jsfile.DynamicJSTestCase): JS_FILENAME = os.path.join("jstests", "hooks", "run_initial_sync_node_validation.js") - def __init__( # pylint: disable=too-many-arguments - self, logger, test_name, description, base_test_name, hook): + def __init__(self, logger, test_name, description, base_test_name, hook): """Initialize IntermediateInitialSyncTestCase.""" jsfile.DynamicJSTestCase.__init__(self, logger, test_name, description, base_test_name, hook, self.JS_FILENAME) diff --git a/buildscripts/resmokelib/testing/hooks/interface.py b/buildscripts/resmokelib/testing/hooks/interface.py index feafc9d20ef..e92a07a5c18 100644 --- a/buildscripts/resmokelib/testing/hooks/interface.py +++ b/buildscripts/resmokelib/testing/hooks/interface.py @@ -62,8 +62,7 @@ class Hook(object, metaclass=registry.make_registry_metaclass(_HOOKS)): # pylin class DynamicTestCase(testcase.TestCase): # pylint: disable=abstract-method """DynamicTestCase class.""" - def __init__( # pylint: disable=too-many-arguments - self, logger, test_name, description, base_test_name, hook): + def __init__(self, logger, test_name, description, base_test_name, hook): """Initialize DynamicTestCase.""" testcase.TestCase.__init__(self, logger, "Hook", test_name, dynamic=True) self.description = description diff --git a/buildscripts/resmokelib/testing/hooks/jsfile.py b/buildscripts/resmokelib/testing/hooks/jsfile.py index 4cfa7f5815a..7489968d834 100644 --- a/buildscripts/resmokelib/testing/hooks/jsfile.py +++ b/buildscripts/resmokelib/testing/hooks/jsfile.py @@ -12,14 +12,13 @@ class JSHook(interface.Hook): REGISTERED_NAME = registry.LEAVE_UNREGISTERED - def __init__( # pylint: disable=too-many-arguments - self, hook_logger, fixture, js_filename, description, shell_options=None): + def __init__(self, hook_logger, fixture, js_filename, description, shell_options=None): """Initialize JSHook.""" interface.Hook.__init__(self, hook_logger, fixture, description) self._js_filename = js_filename self._shell_options = shell_options - def _should_run_after_test(self): # pylint: disable=no-self-use + def _should_run_after_test(self): """Provide base callback. Callback that can be overrided by subclasses to indicate if the JavaScript file should be @@ -84,9 +83,8 @@ class PerClusterDataConsistencyHook(DataConsistencyHook): class DynamicJSTestCase(interface.DynamicTestCase): """A dynamic TestCase that runs a JavaScript file.""" - def __init__( # pylint: disable=too-many-arguments - self, logger, test_name, description, base_test_name, hook, js_filename, - shell_options=None): + def __init__(self, logger, test_name, description, base_test_name, hook, js_filename, + shell_options=None): """Initialize DynamicJSTestCase.""" interface.DynamicTestCase.__init__(self, logger, test_name, description, base_test_name, hook) @@ -104,7 +102,7 @@ class DynamicJSTestCase(interface.DynamicTestCase): interface.DynamicTestCase.reset_logger(self) self._js_test_case.reset_logger() - def configure(self, fixture, *args, **kwargs): # pylint: disable=unused-argument + def configure(self, fixture, *args, **kwargs): """Configure the fixture.""" super().configure(fixture, *args, **kwargs) self._js_test_builder.configure(fixture, *args, **kwargs) diff --git a/buildscripts/resmokelib/testing/hooks/oplog.py b/buildscripts/resmokelib/testing/hooks/oplog.py index d66352180da..94baea30482 100644 --- a/buildscripts/resmokelib/testing/hooks/oplog.py +++ b/buildscripts/resmokelib/testing/hooks/oplog.py @@ -5,7 +5,7 @@ import os.path from buildscripts.resmokelib.testing.hooks import jsfile -class CheckReplOplogs(jsfile.PerClusterDataConsistencyHook): # pylint: disable=non-parent-init-called,super-init-not-called +class CheckReplOplogs(jsfile.PerClusterDataConsistencyHook): """Check that local.oplog.rs matches on the primary and secondaries.""" IS_BACKGROUND = False diff --git a/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py b/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py index b0ff858c5dc..125649a0b2c 100644 --- a/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py +++ b/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py @@ -126,8 +126,7 @@ class PeriodicKillSecondariesTestCase(interface.DynamicTestCase): INTERRUPTED_DUE_TO_REPL_STATE_CHANGE = 11602 INTERRUPTED_DUE_TO_STORAGE_CHANGE = 355 - def __init__( # pylint: disable=too-many-arguments - self, logger, test_name, description, base_test_name, hook, test_report): + def __init__(self, logger, test_name, description, base_test_name, hook, test_report): """Initialize PeriodicKillSecondariesTestCase.""" interface.DynamicTestCase.__init__(self, logger, test_name, description, base_test_name, hook) @@ -262,8 +261,7 @@ class PeriodicKillSecondariesTestCase(interface.DynamicTestCase): self.logger.info(fixture.create_fixture_table(self.fixture)) self.fixture.await_ready() - def _check_invariants_as_standalone(self, secondary): # pylint: disable=too-many-locals - # pylint: disable=too-many-branches,too-many-statements + def _check_invariants_as_standalone(self, secondary): # We remove the --replSet option in order to start the node as a standalone. replset_name = secondary.mongod_options.pop("replSet") self.logger.info( diff --git a/buildscripts/resmokelib/testing/hooks/shard_split.py b/buildscripts/resmokelib/testing/hooks/shard_split.py index 10748f6e1e4..99c11d76482 100644 --- a/buildscripts/resmokelib/testing/hooks/shard_split.py +++ b/buildscripts/resmokelib/testing/hooks/shard_split.py @@ -16,7 +16,7 @@ from buildscripts.resmokelib.testing.hooks import interface from buildscripts.resmokelib.testing.hooks import dbhash_tenant_migration -class ContinuousShardSplit(interface.Hook): # pylint: disable=too-many-instance-attributes +class ContinuousShardSplit(interface.Hook): """Starts a shard split thread at the beginning of each test.""" DESCRIPTION = ("Continuous shard split operations") @@ -154,8 +154,8 @@ class ShardSplitLifeCycle(object): class _ShardSplitOptions: - def __init__( # pylint: disable=too-many-arguments - self, logger, shard_split_fixture, tenant_ids, recipient_tag_name, recipient_set_name): + def __init__(self, logger, shard_split_fixture, tenant_ids, recipient_tag_name, + recipient_set_name): self.logger = logger self.migration_id = uuid.uuid4() self.shard_split_fixture = shard_split_fixture @@ -197,7 +197,7 @@ class _ShardSplitOptions: return str(opts) -class _ShardSplitThread(threading.Thread): # pylint: disable=too-many-instance-attributes +class _ShardSplitThread(threading.Thread): THREAD_NAME = "ShardSplitThread" WAIT_SECS_RANGES = [[0.05, 0.1], [0.1, 0.5], [1, 5], [5, 15]] diff --git a/buildscripts/resmokelib/testing/hooks/stepdown.py b/buildscripts/resmokelib/testing/hooks/stepdown.py index 5c893d322d7..f77a2169ac6 100644 --- a/buildscripts/resmokelib/testing/hooks/stepdown.py +++ b/buildscripts/resmokelib/testing/hooks/stepdown.py @@ -17,7 +17,7 @@ from buildscripts.resmokelib.testing.fixtures import tenant_migration from buildscripts.resmokelib.testing.hooks import interface -class ContinuousStepdown(interface.Hook): # pylint: disable=too-many-instance-attributes +class ContinuousStepdown(interface.Hook): """Regularly connect to replica sets and send a replSetStepDown command.""" DESCRIPTION = ("Continuous stepdown (steps down the primary of replica sets at regular" @@ -28,11 +28,10 @@ class ContinuousStepdown(interface.Hook): # pylint: disable=too-many-instance-a # The hook stops the fixture partially during its execution. STOPS_FIXTURE = True - def __init__( # pylint: disable=too-many-arguments - self, hook_logger, fixture, config_stepdown=True, shard_stepdown=True, - stepdown_interval_ms=8000, terminate=False, kill=False, - use_stepdown_permitted_file=False, wait_for_mongos_retarget=False, - background_reconfig=False, auth_options=None, should_downgrade=False): + def __init__(self, hook_logger, fixture, config_stepdown=True, shard_stepdown=True, + stepdown_interval_ms=8000, terminate=False, kill=False, + use_stepdown_permitted_file=False, wait_for_mongos_retarget=False, + background_reconfig=False, auth_options=None, should_downgrade=False): """Initialize the ContinuousStepdown. Args: @@ -119,7 +118,7 @@ class ContinuousStepdown(interface.Hook): # pylint: disable=too-many-instance-a self._stepdown_thread.pause() self.logger.info("Paused the stepdown thread.") - def _add_fixture(self, fixture): # pylint: disable=too-many-branches + def _add_fixture(self, fixture): if isinstance(fixture, replicaset.ReplicaSetFixture): if not fixture.all_nodes_electable: raise ValueError( @@ -371,11 +370,10 @@ def is_shard_split(fixture): return fixture.__class__.__name__ == 'ShardSplitFixture' -class _StepdownThread(threading.Thread): # pylint: disable=too-many-instance-attributes - def __init__( # pylint: disable=too-many-arguments - self, logger, mongos_fixtures, rs_fixtures, stepdown_interval_secs, terminate, kill, - stepdown_lifecycle, wait_for_mongos_retarget, background_reconfig, fixture, - auth_options=None, should_downgrade=False): +class _StepdownThread(threading.Thread): + def __init__(self, logger, mongos_fixtures, rs_fixtures, stepdown_interval_secs, terminate, + kill, stepdown_lifecycle, wait_for_mongos_retarget, background_reconfig, fixture, + auth_options=None, should_downgrade=False): """Initialize _StepdownThread.""" threading.Thread.__init__(self, name="StepdownThread") self.daemon = True @@ -403,7 +401,6 @@ class _StepdownThread(threading.Thread): # pylint: disable=too-many-instance-at self._is_idle_evt = threading.Event() self._is_idle_evt.set() - # pylint: disable=too-many-function-args self._step_up_stats = collections.Counter() def run(self): @@ -519,7 +516,6 @@ class _StepdownThread(threading.Thread): # pylint: disable=too-many-instance-at for rs_fixture in self._rs_fixtures: self._step_down(rs_fixture) - # pylint: disable=R0912,R0914,R0915 def _step_down(self, rs_fixture): try: old_primary = rs_fixture.get_primary(timeout_secs=self._stepdown_interval_secs) @@ -603,7 +599,7 @@ class _StepdownThread(threading.Thread): # pylint: disable=too-many-instance-at new_primary.get_internal_connection_string() if secondaries else "none") self._step_up_stats[key] += 1 - def _do_wait_for_mongos_retarget(self): # pylint: disable=too-many-branches + def _do_wait_for_mongos_retarget(self): """Run collStats on each collection in each database on each mongos. This is to ensure mongos can target the primary for each shard with data, including the diff --git a/buildscripts/resmokelib/testing/hooks/tenant_migration.py b/buildscripts/resmokelib/testing/hooks/tenant_migration.py index 122dcb534a2..3e34c5be857 100644 --- a/buildscripts/resmokelib/testing/hooks/tenant_migration.py +++ b/buildscripts/resmokelib/testing/hooks/tenant_migration.py @@ -17,7 +17,7 @@ from buildscripts.resmokelib.testing.hooks import dbhash_tenant_migration from buildscripts.resmokelib.testing.hooks import interface -class ContinuousTenantMigration(interface.Hook): # pylint: disable=too-many-instance-attributes +class ContinuousTenantMigration(interface.Hook): """Starts a tenant migration thread at the beginning of each test.""" DESCRIPTION = ("Continuous tenant migrations") @@ -187,8 +187,7 @@ def get_primary(rs, logger, max_tries=5): # noqa: D205,D400 class _TenantMigrationOptions: - def __init__( # pylint: disable=too-many-arguments - self, donor_rs, recipient_rs, tenant_id, read_preference, logger): + def __init__(self, donor_rs, recipient_rs, tenant_id, read_preference, logger): self.donor_rs = donor_rs self.recipient_rs = recipient_rs self.migration_id = uuid.uuid4() @@ -229,7 +228,7 @@ class _TenantMigrationOptions: return str(opts) -class _TenantMigrationThread(threading.Thread): # pylint: disable=too-many-instance-attributes +class _TenantMigrationThread(threading.Thread): THREAD_NAME = "TenantMigrationThread" WAIT_SECS_RANGES = [[0.05, 0.1], [0.1, 0.5], [1, 5], [5, 15]] diff --git a/buildscripts/resmokelib/testing/job.py b/buildscripts/resmokelib/testing/job.py index ba9f54e6912..bf2d33a024e 100644 --- a/buildscripts/resmokelib/testing/job.py +++ b/buildscripts/resmokelib/testing/job.py @@ -12,12 +12,11 @@ from buildscripts.resmokelib.testing.testcases import fixture as _fixture from buildscripts.resmokelib.utils import queue as _queue -class Job(object): # pylint: disable=too-many-instance-attributes +class Job(object): """Run tests from a queue.""" - def __init__( # pylint: disable=too-many-arguments - self, job_num, logger, fixture, hooks, report, archival, suite_options, - test_queue_logger): + def __init__(self, job_num, logger, fixture, hooks, report, archival, suite_options, + test_queue_logger): """Initialize the job with the specified fixture and hooks.""" self.logger = logger diff --git a/buildscripts/resmokelib/testing/report.py b/buildscripts/resmokelib/testing/report.py index 05220e8d136..f2d153cf6b0 100644 --- a/buildscripts/resmokelib/testing/report.py +++ b/buildscripts/resmokelib/testing/report.py @@ -1,3 +1,4 @@ +# pylint: disable=invalid-name """Extension to the unittest.TestResult. This is used to support additional test status and timing information for the report.json file. @@ -14,7 +15,7 @@ from buildscripts.resmokelib.testing.symbolizer_service import ResmokeSymbolizer # pylint: disable=attribute-defined-outside-init -class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attributes +class TestReport(unittest.TestResult): """Record test status and timing information.""" def __init__(self, job_logger, suite_options, job_num=None): @@ -103,7 +104,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr return combined_report - def startTest(self, test): # pylint: disable=invalid-name + def startTest(self, test): """Call before 'test' is run.""" unittest.TestResult.startTest(self, test) @@ -136,7 +137,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr test.override_logger(test_logger) test_info.start_time = time.time() - def stopTest(self, test): # pylint: disable=invalid-name + def stopTest(self, test): """Call after 'test' has run.""" # check if there are stacktrace files, if so, invoke the symbolizer here. @@ -171,7 +172,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr # Restore the original logger for the test. test.reset_logger() - def addError(self, test, err): # pylint: disable=invalid-name + def addError(self, test, err): """Call when a non-failureException was raised during the execution of 'test'.""" unittest.TestResult.addError(self, test, err) @@ -185,7 +186,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr test_info.evergreen_status = "fail" test_info.return_code = test.return_code - def setError(self, test): # pylint: disable=invalid-name + def setError(self, test): """Change the outcome of an existing test to an error.""" self.job_logger.info("setError(%s)", test) @@ -205,7 +206,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr self.num_errored = len(self.get_errored()) self.num_interrupted = len(self.get_interrupted()) - def addFailure(self, test, err): # pylint: disable=invalid-name + def addFailure(self, test, err): """Call when a failureException was raised during the execution of 'test'.""" unittest.TestResult.addFailure(self, test, err) @@ -223,7 +224,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr test_info.evergreen_status = self.suite_options.report_failure_status test_info.return_code = test.return_code - def setFailure(self, test, return_code=1): # pylint: disable=invalid-name + def setFailure(self, test, return_code=1): """Change the outcome of an existing test to a failure.""" with self._lock: @@ -246,7 +247,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr self.num_errored = len(self.get_errored()) self.num_interrupted = len(self.get_interrupted()) - def addSuccess(self, test): # pylint: disable=invalid-name + def addSuccess(self, test): """Call when 'test' executed successfully.""" unittest.TestResult.addSuccess(self, test) @@ -259,7 +260,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr test_info.evergreen_status = "pass" test_info.return_code = test.return_code - def wasSuccessful(self): # pylint: disable=invalid-name + def wasSuccessful(self): """Return true if all tests executed successfully.""" with self._lock: @@ -387,7 +388,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr raise ValueError("Details for %s not found in the report" % (test.basename())) -class TestInfo(object): # pylint: disable=too-many-instance-attributes +class TestInfo(object): """Holder for the test status and timing information.""" def __init__(self, test_id, test_file, dynamic): diff --git a/buildscripts/resmokelib/testing/suite.py b/buildscripts/resmokelib/testing/suite.py index e089d28b191..33215c08ee4 100644 --- a/buildscripts/resmokelib/testing/suite.py +++ b/buildscripts/resmokelib/testing/suite.py @@ -59,7 +59,7 @@ def synchronized(method): return synced -class Suite(object): # pylint: disable=too-many-instance-attributes,too-many-public-methods +class Suite(object): """A suite of tests of a particular kind (e.g. C++ unit tests, dbtests, jstests).""" def __init__(self, suite_name, suite_config, suite_options=_config.SuiteOptions.ALL_INHERITED): diff --git a/buildscripts/resmokelib/testing/testcases/benchmark_test.py b/buildscripts/resmokelib/testing/testcases/benchmark_test.py index 9902bd503ef..e5fb07ddac0 100644 --- a/buildscripts/resmokelib/testing/testcases/benchmark_test.py +++ b/buildscripts/resmokelib/testing/testcases/benchmark_test.py @@ -21,7 +21,7 @@ class BenchmarkTestCase(interface.ProcessTestCase): self.suite_bm_options = program_options self.bm_options = {} - def validate_benchmark_options(self): # pylint: disable=no-self-use + def validate_benchmark_options(self): """Error out early if any options are incompatible with benchmark test suites. :return: None diff --git a/buildscripts/resmokelib/testing/testcases/cpp_libfuzzer_test.py b/buildscripts/resmokelib/testing/testcases/cpp_libfuzzer_test.py index c0c8cb69c19..33ffa02bdb1 100644 --- a/buildscripts/resmokelib/testing/testcases/cpp_libfuzzer_test.py +++ b/buildscripts/resmokelib/testing/testcases/cpp_libfuzzer_test.py @@ -15,9 +15,8 @@ class CPPLibfuzzerTestCase(interface.ProcessTestCase): REGISTERED_NAME = "cpp_libfuzzer_test" DEFAULT_TIMEOUT = datetime.timedelta(hours=1) - def __init__( # pylint: disable=too-many-arguments - self, logger, program_executable, program_options=None, runs=1000000, - corpus_directory_stem="corpora"): + def __init__(self, logger, program_executable, program_options=None, runs=1000000, + corpus_directory_stem="corpora"): """Initialize the CPPLibfuzzerTestCase with the executable to run.""" interface.ProcessTestCase.__init__(self, logger, "C++ libfuzzer test", program_executable) diff --git a/buildscripts/resmokelib/testing/testcases/fsm_workload_test.py b/buildscripts/resmokelib/testing/testcases/fsm_workload_test.py index 242b4f98b91..9be2eaa2aaa 100644 --- a/buildscripts/resmokelib/testing/testcases/fsm_workload_test.py +++ b/buildscripts/resmokelib/testing/testcases/fsm_workload_test.py @@ -15,9 +15,8 @@ class FSMWorkloadTestCase(jsrunnerfile.JSRunnerFileTestCase): _COUNTER_LOCK = threading.Lock() _COUNTER = 0 - def __init__( #pylint: disable=too-many-arguments - self, logger, selected_tests, shell_executable=None, shell_options=None, same_db=False, - same_collection=False, db_name_prefix=None): + def __init__(self, logger, selected_tests, shell_executable=None, shell_options=None, + same_db=False, same_collection=False, db_name_prefix=None): """Initialize the FSMWorkloadTestCase with the FSM workload file.""" self.same_collection = same_collection diff --git a/buildscripts/resmokelib/testing/testcases/interface.py b/buildscripts/resmokelib/testing/testcases/interface.py index 19d52f3a08c..d07a786c39e 100644 --- a/buildscripts/resmokelib/testing/testcases/interface.py +++ b/buildscripts/resmokelib/testing/testcases/interface.py @@ -21,7 +21,7 @@ def make_test_case(test_kind, *args, **kwargs): return _TEST_CASES[test_kind](*args, **kwargs) -class TestCase(unittest.TestCase, metaclass=registry.make_registry_metaclass(_TEST_CASES)): # pylint: disable=too-many-instance-attributes, invalid-metaclass +class TestCase(unittest.TestCase, metaclass=registry.make_registry_metaclass(_TEST_CASES)): # pylint: disable=invalid-metaclass """A test case to execute.""" REGISTERED_NAME = registry.LEAVE_UNREGISTERED @@ -105,12 +105,12 @@ class TestCase(unittest.TestCase, metaclass=registry.make_registry_metaclass(_TE """Run the specified test.""" raise NotImplementedError("run_test must be implemented by TestCase subclasses") - def as_command(self): # pylint: disable=no-self-use + def as_command(self): """Return the command invocation used to run the test or None.""" return None -class UndoDBUtilsMixin: # pylint: disable=abstract-method +class UndoDBUtilsMixin: """Utility functions for interacting with UndoDB.""" def __init__(self, logger, *args, **kwargs): # pylint: disable=unused-argument @@ -127,7 +127,7 @@ class UndoDBUtilsMixin: # pylint: disable=abstract-method os.rename(recording, recording + '.tokeep') -class ProcessTestCase(TestCase, UndoDBUtilsMixin): # pylint: disable=abstract-method +class ProcessTestCase(TestCase, UndoDBUtilsMixin): """Base class for TestCases that executes an external process.""" def run_test(self): diff --git a/buildscripts/resmokelib/testing/testcases/jsrunnerfile.py b/buildscripts/resmokelib/testing/testcases/jsrunnerfile.py index 620b1636971..652cdb1dfdc 100644 --- a/buildscripts/resmokelib/testing/testcases/jsrunnerfile.py +++ b/buildscripts/resmokelib/testing/testcases/jsrunnerfile.py @@ -12,9 +12,8 @@ class JSRunnerFileTestCase(interface.ProcessTestCase): REGISTERED_NAME = registry.LEAVE_UNREGISTERED - def __init__( # pylint: disable=too-many-arguments - self, logger, test_kind, test_name, test_runner_file, shell_executable=None, - shell_options=None): + def __init__(self, logger, test_kind, test_name, test_runner_file, shell_executable=None, + shell_options=None): """Initialize the JSRunnerFileTestCase with the 'test_name' file.""" interface.ProcessTestCase.__init__(self, logger, test_kind, test_name) diff --git a/buildscripts/resmokelib/testing/testcases/jstest.py b/buildscripts/resmokelib/testing/testcases/jstest.py index 648937d6f12..e9d451847f4 100644 --- a/buildscripts/resmokelib/testing/testcases/jstest.py +++ b/buildscripts/resmokelib/testing/testcases/jstest.py @@ -22,7 +22,7 @@ class _SingleJSTestCase(interface.ProcessTestCase): REGISTERED_NAME = registry.LEAVE_UNREGISTERED - def __init__(self, logger, js_filename, _id, shell_executable=None, shell_options=None): # pylint: disable=too-many-arguments + def __init__(self, logger, js_filename, _id, shell_executable=None, shell_options=None): """Initialize the _SingleJSTestCase with the JS file to run.""" interface.ProcessTestCase.__init__(self, logger, "JSTest", js_filename) diff --git a/buildscripts/resmokelib/testing/testcases/sdam_json_test.py b/buildscripts/resmokelib/testing/testcases/sdam_json_test.py index cdff7efecc9..aa4d26cb684 100644 --- a/buildscripts/resmokelib/testing/testcases/sdam_json_test.py +++ b/buildscripts/resmokelib/testing/testcases/sdam_json_test.py @@ -24,7 +24,7 @@ class SDAMJsonTestCase(interface.ProcessTestCase): self.json_test_file = os.path.normpath(json_test_file) self.program_options = utils.default_if_none(program_options, {}).copy() - def _find_executable(self): # pylint: disable=no-self-use + def _find_executable(self): binary = os.path.join(config.INSTALL_DIR, "sdam_json_test") if os.name == "nt": binary += ".exe" diff --git a/buildscripts/resmokelib/testing/testcases/server_selection_json_test.py b/buildscripts/resmokelib/testing/testcases/server_selection_json_test.py index db018e58c52..d90209dd92d 100644 --- a/buildscripts/resmokelib/testing/testcases/server_selection_json_test.py +++ b/buildscripts/resmokelib/testing/testcases/server_selection_json_test.py @@ -25,7 +25,7 @@ class ServerSelectionJsonTestCase(interface.ProcessTestCase): self.json_test_file = os.path.normpath(json_test_file) self.program_options = utils.default_if_none(program_options, {}).copy() - def _find_executable(self): # pylint: disable=no-self-use + def _find_executable(self): binary = os.path.join(config.INSTALL_DIR, "server_selection_json_test") if os.name == "nt": binary += ".exe" |
