diff --git a/dictionaries/library_test.txt b/dictionaries/library_test.txt new file mode 100644 index 0000000000..5fadc6a227 --- /dev/null +++ b/dictionaries/library_test.txt @@ -0,0 +1,15 @@ +aserción +aserciona +búfers +comenzándolo +deshabilitar +deshabilita +faltante +links +multidifusión +optimización +restableciéndola +reutilización +subinterpretador +subinterpretadores +PyUnit diff --git a/library/test.po b/library/test.po index 9f3e5f36e3..affc284949 100644 --- a/library/test.po +++ b/library/test.po @@ -6,23 +6,25 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-07-26 12:19+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: \n" +"Language: es\n" +"X-Generator: Poedit 2.3.1\n" #: ../Doc/library/test.rst:2 msgid ":mod:`test` --- Regression tests package for Python" -msgstr "" +msgstr ":mod:`test` --- Paquete de pruebas de regresión para Python" #: ../Doc/library/test.rst:10 msgid "" @@ -32,6 +34,11 @@ msgid "" "mentioned here can change or be removed without notice between releases of " "Python." msgstr "" +"El paquete :mod:`test` está destinado solo para uso interno de Python. Está " +"documentado para beneficio de los desarrolladores principales de Python. Se " +"desaconseja el uso de este paquete fuera de la biblioteca estándar de " +"Python, ya que el código mencionado aquí puede cambiar o eliminarse sin " +"previo aviso entre versiones de Python." #: ../Doc/library/test.rst:18 msgid "" @@ -40,6 +47,10 @@ msgid "" "support` is used to enhance your tests while :mod:`test.regrtest` drives the " "testing suite." msgstr "" +"El paquete :mod:`test` contiene todas las pruebas de regresión para Python, " +"así como los módulos :mod:`test.support` y :mod:`test.regrtest`. Se utiliza :" +"mod:`test.support` para mejorar sus pruebas, mientras que :mod:`test." +"regrtest` maneja el conjunto de pruebas." #: ../Doc/library/test.rst:23 msgid "" @@ -49,26 +60,32 @@ msgid "" "tests are written using a \"traditional\" testing style that compares output " "printed to ``sys.stdout``; this style of test is considered deprecated." msgstr "" +"Cada módulo en el paquete :mod:`test` cuyo nombre comienza con ``test_`` es " +"un conjunto de pruebas para un módulo o característica específica. Todas las " +"pruebas nuevas deben escribirse usando el módulo :mod:`unittest` o :mod:" +"`doctest`. Algunas pruebas anteriores se escriben utilizando un estilo de " +"prueba \"tradicional\" que compara la salida impresa con ``sys.stdout``; " +"este estilo de prueba se considera obsoleto." #: ../Doc/library/test.rst:33 msgid "Module :mod:`unittest`" -msgstr "" +msgstr "Módulo :mod:`unittest`" #: ../Doc/library/test.rst:33 msgid "Writing PyUnit regression tests." -msgstr "" +msgstr "Escritura de pruebas de regresión de PyUnit." #: ../Doc/library/test.rst:35 msgid "Module :mod:`doctest`" -msgstr "" +msgstr "Módulo :mod:`doctest`" #: ../Doc/library/test.rst:36 msgid "Tests embedded in documentation strings." -msgstr "" +msgstr "Pruebas integradas en cadenas de caracteres de documentación." #: ../Doc/library/test.rst:42 msgid "Writing Unit Tests for the :mod:`test` package" -msgstr "" +msgstr "Escritura de pruebas unitarias para el paquete :mod:`test`" #: ../Doc/library/test.rst:44 msgid "" @@ -83,10 +100,22 @@ msgid "" "methods. This is done because documentation strings get printed out if they " "exist and thus what test is being run is not stated." msgstr "" +"Se prefiere que las pruebas que utilizan el módulo :mod:`unittest` sigan " +"algunas pautas. Una es nombrar el módulo de prueba comenzándolo con " +"``test_`` y terminarlo con el nombre del módulo que se está probando. Los " +"métodos de prueba en el módulo de prueba deben comenzar con ``test_`` y " +"terminar con una descripción de lo que el método está probando. Esto es " +"necesario para que el controlador de prueba reconozca los métodos como " +"métodos de prueba. Por lo tanto, no se debe incluir una cadena de caracteres " +"de documentación para el método. Se debe usar un comentario (como ``# Tests " +"function returns only True or False``) para proporcionar documentación para " +"los métodos de prueba. Esto se hace porque las cadenas de documentación se " +"imprimen si existen y, por lo tanto, no se indica qué prueba se está " +"ejecutando." #: ../Doc/library/test.rst:55 msgid "A basic boilerplate is often used::" -msgstr "" +msgstr "A menudo se usa una plantilla básica::" #: ../Doc/library/test.rst:88 msgid "" @@ -94,12 +123,17 @@ msgid "" "regrtest`, on its own as a script that supports the :mod:`unittest` CLI, or " "via the ``python -m unittest`` CLI." msgstr "" +"Este patrón de código permite que el conjunto de pruebas sea ejecutado por :" +"mod:`test.regrtest`, como un script que admite la CLI :mod:`unittest`, o " +"mediante la CLI ``python -m unittest``." #: ../Doc/library/test.rst:92 msgid "" "The goal for regression testing is to try to break code. This leads to a few " "guidelines to be followed:" msgstr "" +"El objetivo de las pruebas de regresión es intentar romper el código. Esto " +"lleva a algunas pautas a seguir:" #: ../Doc/library/test.rst:95 msgid "" @@ -107,6 +141,9 @@ msgid "" "This includes not just the external API that is to be presented to the " "outside world but also \"private\" code." msgstr "" +"El conjunto de pruebas debe ejercer todas las clases, funciones y " +"constantes. Esto incluye no solo la API externa que se presentará al mundo " +"exterior sino también el código \"privado\"." #: ../Doc/library/test.rst:99 msgid "" @@ -115,6 +152,10 @@ msgid "" "interface) is not complete enough to make sure all boundary and edge cases " "are tested." msgstr "" +"Se prefiere la prueba de caja blanca (examinar el código que se prueba " +"cuando se escriben las pruebas). Las pruebas de caja negra (probar solo la " +"interfaz de usuario publicada) no son lo suficientemente completas como para " +"garantizar que se prueben todos los casos límite y límite." #: ../Doc/library/test.rst:104 msgid "" @@ -122,12 +163,18 @@ msgid "" "sure that not only all valid values are acceptable but also that improper " "values are handled correctly." msgstr "" +"Asegúrese de que todos los valores posibles son probados, incluidos los no " +"válidos. Esto asegura que no solo todos los valores válidos sean aceptables, " +"sino que los valores incorrectos se manejen correctamente." #: ../Doc/library/test.rst:108 msgid "" "Exhaust as many code paths as possible. Test where branching occurs and thus " "tailor input to make sure as many different paths through the code are taken." msgstr "" +"Agote tantas rutas de código cómo sea posible. Pruebe donde se produce la " +"ramificación y, por lo tanto, adapte la entrada para asegurarse de que se " +"toman muchas rutas diferentes a través del código." #: ../Doc/library/test.rst:111 msgid "" @@ -135,18 +182,25 @@ msgid "" "make sure that the error does not crop up again if the code is changed in " "the future." msgstr "" +"Añada una prueba explícita para cualquier error descubierto para el código " +"probado. Esto asegurará que el error no vuelva a aparecer si el código se " +"cambia en el futuro." #: ../Doc/library/test.rst:115 msgid "" "Make sure to clean up after your tests (such as close and remove all " "temporary files)." msgstr "" +"Asegúrese de limpiar después de sus pruebas (así como cerrar y eliminar " +"todos los archivos temporales)." #: ../Doc/library/test.rst:118 msgid "" "If a test is dependent on a specific condition of the operating system then " "verify the condition already exists before attempting the test." msgstr "" +"Si una prueba depende de una condición específica del sistema operativo, " +"verifique que la condición ya existe antes de intentar la prueba." #: ../Doc/library/test.rst:121 msgid "" @@ -154,6 +208,10 @@ msgid "" "minimizes external dependencies of tests and also minimizes possible " "anomalous behavior from side-effects of importing a module." msgstr "" +"Importe la menor cantidad de módulos posible y hágalo lo antes posible. Esto " +"minimiza las dependencias externas de las pruebas y también minimiza el " +"posible comportamiento anómalo de los efectos secundarios de importar un " +"módulo." #: ../Doc/library/test.rst:125 msgid "" @@ -161,6 +219,10 @@ msgid "" "small as what type of input is used. Minimize code duplication by " "subclassing a basic test class with a class that specifies the input::" msgstr "" +"Intente maximizar la reutilización del código. En ocasiones, las pruebas " +"variarán en algo tan pequeño como qué tipo de entrada se utiliza. Minimice " +"la duplicación de código usando como clase base una clase de prueba básica " +"con una clase que especifique la entrada::" #: ../Doc/library/test.rst:145 msgid "" @@ -169,18 +231,22 @@ msgid "" "example above does not have any data and so can't be run by itself, thus it " "does not inherit from :class:`unittest.TestCase`." msgstr "" +"Cuando use este patrón, recuerde que todas las clases que heredan :class:" +"`unittest.TestCase` se ejecutan como pruebas. La clase :class:`Mixin` en el " +"ejemplo anterior no tiene ningún dato y, por lo tanto, no se puede ejecutar " +"solo, por lo tanto, no hereda de :class:`unittest.TestCase`." #: ../Doc/library/test.rst:153 msgid "Test Driven Development" -msgstr "" +msgstr "Desarrollo dirigido por pruebas (*Test Driven Development*)" #: ../Doc/library/test.rst:154 msgid "A book by Kent Beck on writing tests before code." -msgstr "" +msgstr "Un libro de *Kent Beck* sobre pruebas de escritura antes del código." #: ../Doc/library/test.rst:160 msgid "Running tests using the command-line interface" -msgstr "" +msgstr "Ejecución de pruebas utilizando la interfaz de línea de comandos" #: ../Doc/library/test.rst:162 msgid "" @@ -197,6 +263,19 @@ msgid "" "test (:program:`python -m test test_spam`) will minimize output and only " "print whether the test passed or failed." msgstr "" +"El paquete :mod:`test` puede ejecutarse como un script para controlar el " +"conjunto de pruebas de regresión de Python, gracias a la opción :option:`-" +"m` : :program:`python -m test`. Internamente, se utiliza :mod:`test." +"regrtest`; la llamada :program:`python -m test.regrtest` utilizada en " +"versiones anteriores de Python todavía funciona. Ejecuta el script por sí " +"mismo automáticamente y comienza a ejecutar todas las pruebas de regresión " +"en el paquete :mod:`test.regrtest. Lo hace buscando todos los módulos en el " +"paquete cuyo nombre comienza con ``test_``, importándolos y ejecutando la " +"función :func:`test_main` si está presente o cargando las pruebas a través " +"de *unittest.TestLoader.loadTestsFromModule* si ``test_main`` no existe. Los " +"nombres de las pruebas a ejecutar también se pueden pasar al script. La " +"especificación de una prueba de regresión única (:program:`python -m test " +"test_spam`) minimizará la salida y solo imprimirá si la prueba pasó o no." #: ../Doc/library/test.rst:175 msgid "" @@ -210,6 +289,16 @@ msgid "" "the ``audio`` and ``largefile`` resources. For a list of all resources and " "more command-line options, run :program:`python -m test -h`." msgstr "" +"Ejecutando :mod:`test` directamente permite establecer qué recursos están " +"disponibles para que se usen las pruebas. Para ello, use la opción de línea " +"de comandos ``-u``. Al especificar ``all`` como el valor para la opción ``-" +"u`` se habilitan todos los recursos posibles: :program:`python -m test -" +"uall`. Si se desean todos los recursos menos uno (un caso más común), se " +"puede enumerar una lista de recursos separados por comas que no se desean " +"después de ``all``. El comando :program:`python -m test -uall,-audio,-" +"largefile` ejecutará :mod:`test` con todos los recursos excepto los recursos " +"``audio`` y ``largefile``. Para obtener una lista de todos los recursos y " +"más opciones de línea de comandos, ejecute :program:`python -m test -h`." #: ../Doc/library/test.rst:186 msgid "" @@ -219,16 +308,24 @@ msgid "" "program:`rt.bat` from your :file:`PCbuild` directory will run all regression " "tests." msgstr "" +"Algunas otras formas de ejecutar las pruebas de regresión dependen de en qué " +"plataforma se ejecuten las pruebas. En Unix, puede ejecutar :program:`make " +"test` en el directorio de nivel superior donde se construyó Python. En " +"Windows, ejecutar :program:`rt.bat` desde su directorio :file:`PCbuild` " +"ejecutará todas las pruebas de regresión." #: ../Doc/library/test.rst:194 msgid ":mod:`test.support` --- Utilities for the Python test suite" msgstr "" +":mod:`test.support` --- Utilidades para el conjunto de pruebas de Python" #: ../Doc/library/test.rst:200 msgid "" "The :mod:`test.support` module provides support for Python's regression test " "suite." msgstr "" +"El módulo :mod:`test.support` proporciona soporte para el conjunto de " +"pruebas de regresión de Python." #: ../Doc/library/test.rst:205 msgid "" @@ -236,10 +333,14 @@ msgid "" "Python developers write tests. The API of this module is subject to change " "without backwards compatibility concerns between releases." msgstr "" +":mod:`test.support` no es un módulo público. Está documentado aquí para " +"ayudar a los desarrolladores de Python a escribir pruebas. La API de este " +"módulo está sujeta a cambios sin problemas de compatibilidad con versiones " +"anteriores entre versiones." #: ../Doc/library/test.rst:210 msgid "This module defines the following exceptions:" -msgstr "" +msgstr "Este módulo define las siguientes excepciones:" #: ../Doc/library/test.rst:214 msgid "" @@ -247,6 +348,9 @@ msgid "" "mod:`unittest`\\ -based tests and :class:`unittest.TestCase`'s assertion " "methods." msgstr "" +"Excepción que se lanzará cuando una prueba falle. Esto está en desuso a " +"favor de pruebas basadas en :mod:`unittest`\\ y en métodos de aserción :" +"class:`unittest.TestCase`" #: ../Doc/library/test.rst:221 msgid "" @@ -254,10 +358,13 @@ msgid "" "network connection) is not available. Raised by the :func:`requires` " "function." msgstr "" +"La subclase de :exc:`unittest.SkipTest`. Se lanza cuando un recurso (como " +"una conexión de red) no está disponible. Lanzado por la función :func:" +"`requires`." #: ../Doc/library/test.rst:226 msgid "The :mod:`test.support` module defines the following constants:" -msgstr "" +msgstr "El módulo :mod:`test.support` define las siguientes constantes:" #: ../Doc/library/test.rst:230 msgid "" @@ -265,36 +372,42 @@ msgid "" "detailed information is desired about a running test. *verbose* is set by :" "mod:`test.regrtest`." msgstr "" +"``True`` cuando la salida detallada está habilitada. Debe verificarse cuando " +"se desea información más detallada sobre una prueba en ejecución. *verbose* " +"está establecido por :mod:`test.regrtest`." #: ../Doc/library/test.rst:237 msgid "``True`` if the running interpreter is Jython." -msgstr "" +msgstr "``True`` si el intérprete en ejecución es Jython." #: ../Doc/library/test.rst:242 msgid "``True`` if the system is Android." -msgstr "" +msgstr "``True`` si el sistema es Android." #: ../Doc/library/test.rst:247 msgid "Path for shell if not on Windows; otherwise ``None``." -msgstr "" +msgstr "Ruta del shell si no está en Windows; de otra manera ``None``." #: ../Doc/library/test.rst:252 msgid "A non-ASCII character encodable by :func:`os.fsencode`." -msgstr "" +msgstr "Un carácter no codificable ASCII codificable por :func:`os.fsencode`." #: ../Doc/library/test.rst:257 msgid "" "Set to a name that is safe to use as the name of a temporary file. Any " "temporary file that is created should be closed and unlinked (removed)." msgstr "" +"Establecido a un nombre que sea seguro de usar como nombre de un archivo " +"temporal. Cualquier archivo temporal que se cree debe cerrarse y " +"desvincularse (eliminarse)." #: ../Doc/library/test.rst:263 msgid "Set to a non-ASCII name for a temporary file." -msgstr "" +msgstr "Establecido un nombre que no sea ASCII para un archivo temporal." #: ../Doc/library/test.rst:268 msgid "Set to :func:`sys.getfilesystemencoding`." -msgstr "" +msgstr "Establecido en :func:`sys.getfilesystemencoding`." #: ../Doc/library/test.rst:273 msgid "" @@ -302,6 +415,9 @@ msgid "" "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" +"Establecido un nombre de archivo (tipo *str*) que no se pueda codificar " +"mediante la codificación del sistema de archivos en modo estricto. Puede ser " +"``None`` si no es posible generar dicho nombre de archivo." #: ../Doc/library/test.rst:280 msgid "" @@ -309,118 +425,153 @@ msgid "" "system encoding in strict mode. It may be ``None`` if it's not possible to " "generate such a filename." msgstr "" +"Establecido un nombre de archivo (tipo de bytes) que no pueda descodificarse " +"mediante la codificación del sistema de archivos en modo estricto. Puede ser " +"``None`` si no es posible generar dicho nombre de archivo." #: ../Doc/library/test.rst:287 msgid "Set to a filename containing the :data:`FS_NONASCII` character." msgstr "" +"Establecido un nombre de archivo que contiene el carácter :data:" +"`FS_NONASCII`." #: ../Doc/library/test.rst:292 msgid "Set to ``True`` if IPV6 is enabled on this host, ``False`` otherwise." msgstr "" +"Establecido ``True`` si *IPV6* está habilitado en este host, de lo contrario " +"``False``." #: ../Doc/library/test.rst:297 msgid "Set to :func:`os.getcwd`." -msgstr "" +msgstr "Establecido :func:`os.getcwd`." #: ../Doc/library/test.rst:302 msgid "Set when tests can be skipped when they are not useful for PGO." msgstr "" +"Establecido cuando se pueden omitir las pruebas cuando no son útiles para " +"*PGO*." #: ../Doc/library/test.rst:307 msgid "" "A constant that is likely larger than the underlying OS pipe buffer size, to " "make writes blocking." msgstr "" +"Una constante que probablemente sea más grande que el tamaño del búfer de la " +"tubería (*pipe*) del sistema operativo subyacente, para bloquear las " +"escrituras." #: ../Doc/library/test.rst:313 msgid "" "A constant that is likely larger than the underlying OS socket buffer size, " "to make writes blocking." msgstr "" +"Una constante que probablemente sea más grande que el tamaño del búfer del " +"socket del sistema operativo subyacente para bloquear las escrituras." #: ../Doc/library/test.rst:319 msgid "Set to the top level directory that contains :mod:`test.support`." msgstr "" +"Establecido en el directorio de nivel superior que contiene :mod:`test." +"support`." #: ../Doc/library/test.rst:324 msgid "Set to the top level directory for the test package." msgstr "" +"Establecido en el directorio de nivel superior para el paquete de prueba." #: ../Doc/library/test.rst:329 msgid "Set to the ``data`` directory within the test package." -msgstr "" +msgstr "Establecido en el directorio ``data`` dentro del paquete de prueba." #: ../Doc/library/test.rst:334 msgid "Set to :data:`sys.maxsize` for big memory tests." -msgstr "" +msgstr "Establecido :data:`sys.maxsize` para pruebas de gran memoria." #: ../Doc/library/test.rst:339 msgid "" "Set by :func:`set_memlimit` as the memory limit for big memory tests. " "Limited by :data:`MAX_Py_ssize_t`." msgstr "" +"Establecido por :func:`set_memlimit` como límite de memoria para pruebas de " +"memoria grande. Limitado por :data:`MAX_Py_ssize_t`." #: ../Doc/library/test.rst:345 msgid "" "Set by :func:`set_memlimit` as the memory limit for big memory tests. Not " "limited by :data:`MAX_Py_ssize_t`." msgstr "" +"Establecido por :func:`set_memlimit` como límite de memoria para pruebas de " +"memoria grande. No limitado por :data:`MAX_Py_ssize_t`." #: ../Doc/library/test.rst:351 msgid "" "Return ``True`` if running on CPython, not on Windows, and configuration not " "set with ``WITH_DOC_STRINGS``." msgstr "" +"Retorna ``True`` si se ejecuta en CPython, no en Windows, y la configuración " +"no está configurada con ``WITH_DOC_STRINGS``." #: ../Doc/library/test.rst:357 msgid "Check for presence of docstrings." -msgstr "" +msgstr "Verifica la presencia de cadenas de documentos (*docstrings*)." #: ../Doc/library/test.rst:362 msgid "Define the URL of a dedicated HTTP server for the network tests." -msgstr "" +msgstr "Define la URL de un servidor HTTP dedicado para las pruebas de red." #: ../Doc/library/test.rst:367 msgid "Object that is equal to anything. Used to test mixed type comparison." msgstr "" +"Objeto que es igual a cualquier cosa. Se utiliza para probar la comparación " +"de tipos mixtos." #: ../Doc/library/test.rst:372 msgid "" "Object that is greater than anything (except itself). Used to test mixed " "type comparison." msgstr "" +"Objeto que es mayor que cualquier cosa (excepto a sí mismo). Se utiliza para " +"probar la comparación de tipos mixtos." #: ../Doc/library/test.rst:378 msgid "" "Object that is less than anything (except itself). Used to test mixed type " "comparison." msgstr "" +"Objeto que es menor que cualquier cosa (excepto él mismo). Se utiliza para " +"probar la comparación de tipos mixtos." #: ../Doc/library/test.rst:382 msgid "The :mod:`test.support` module defines the following functions:" -msgstr "" +msgstr "El módulo :mod:`test.support` define las siguientes funciones:" #: ../Doc/library/test.rst:386 msgid "" "Remove the module named *module_name* from ``sys.modules`` and delete any " "byte-compiled files of the module." msgstr "" +"Elimina el módulo llamado *module_name* de ``sys.modules`` y elimina los " +"archivos compilados por bytes del módulo." #: ../Doc/library/test.rst:392 msgid "Delete *name* from ``sys.modules``." -msgstr "" +msgstr "Elimina *name* de ``sys.modules``." #: ../Doc/library/test.rst:397 msgid "" "Call :func:`os.unlink` on *filename*. On Windows platforms, this is wrapped " "with a wait loop that checks for the existence fo the file." msgstr "" +"Llama a :func:`os.unlink` en *filename*. En plataformas Windows, esto está " +"envuelto con un ciclo de espera que verifica la existencia del archivo." #: ../Doc/library/test.rst:403 msgid "" "Call :func:`os.rmdir` on *filename*. On Windows platforms, this is wrapped " "with a wait loop that checks for the existence of the file." msgstr "" +"Llama a :func:`os.rmdir` en *filename*. En las plataformas Windows, esto " +"está envuelto con un ciclo de espera que verifica la existencia del archivo." #: ../Doc/library/test.rst:409 msgid "" @@ -428,6 +579,10 @@ msgid "" "rmdir` to remove a path and its contents. On Windows platforms, this is " "wrapped with a wait loop that checks for the existence of the files." msgstr "" +"Llama a :func:`shutil.rmtree` en *path* o :func:`os.lstat` y :func:`os." +"rmdir` para eliminar una ruta y su contenido. En las plataformas Windows, " +"esto está envuelto con un ciclo de espera que verifica la existencia de los " +"archivos." #: ../Doc/library/test.rst:416 msgid "" @@ -436,6 +591,11 @@ msgid "" "system path to the source file. It does not need to exist, however the PEP " "3147/488 pyc file must exist." msgstr "" +"Mueve un archivo *pyc* de :pep:`3147`/:pep:`488` a su ubicación heredada y " +"retorna la ruta del sistema de archivos al archivo de *pyc* heredado. El " +"valor de origen es la ruta del sistema de archivos al archivo fuente. No es " +"necesario que exista, sin embargo, debe existir el archivo PEP 3147/488 " +"*pyc*." #: ../Doc/library/test.rst:424 msgid "" @@ -443,14 +603,17 @@ msgid "" "available resources is only set when :mod:`test.regrtest` is executing the " "tests." msgstr "" +"Retorna ``True`` si *resource* está habilitado y disponible. La lista de " +"recursos disponibles solo se establece cuando :mod:`test.regrtest` está " +"ejecutando las pruebas." #: ../Doc/library/test.rst:431 msgid "Return ``True`` if Python was not built with ``-O0`` or ``-Og``." -msgstr "" +msgstr "Retorna ``True`` si Python no fue construido con ``-O0`` o ``-Og``." #: ../Doc/library/test.rst:436 msgid "Return :data:`_testcapi.WITH_PYMALLOC`." -msgstr "" +msgstr "Retorna :data:`_testcapi.WITH_PYMALLOC`." #: ../Doc/library/test.rst:441 msgid "" @@ -459,15 +622,21 @@ msgid "" "if called by a function whose ``__name__`` is ``'__main__'``. Used when " "tests are executed by :mod:`test.regrtest`." msgstr "" +"Lanza :exc:`ResourceDenied` si *resource* no está disponible. *msg* es el " +"argumento para :exc:`ResourceDenied` si se lanza. Siempre retorna ``True`` " +"si es invocado por una función cuyo ``__name__`` es ``'__main__'``. Se usa " +"cuando se ejecutan pruebas por :mod:`test.regrtest`." #: ../Doc/library/test.rst:449 msgid "" "Raise :exc:`unittest.SkipTest` on TLS certification validation failures." msgstr "" +"Lanza :exc:`unittest.SkipTest` en fallos de validación de certificación " +"*TLS*." #: ../Doc/library/test.rst:454 msgid "Return a repr of *dict* with keys sorted." -msgstr "" +msgstr "Retorna una representación del *diccionario* con las claves ordenadas." #: ../Doc/library/test.rst:459 msgid "" @@ -475,29 +644,37 @@ msgid "" "*filename* is returned. This does not equal a failure since it could be the " "path to the file." msgstr "" +"Retorna la ruta al archivo llamado *filename*. Si no se encuentra ninguna " +"coincidencia, se retorna *filename*. Esto no equivale a un fallo, ya que " +"podría ser la ruta al archivo." #: ../Doc/library/test.rst:463 msgid "" "Setting *subdir* indicates a relative path to use to find the file rather " "than looking directly in the path directories." msgstr "" +"La configuración *subdir* indica una ruta relativa a utilizar para encontrar " +"el archivo en lugar de buscar directamente en los directorios de ruta." #: ../Doc/library/test.rst:469 msgid "" "Create an empty file with *filename*. If it already exists, truncate it." -msgstr "" +msgstr "Crea un archivo vacío con *filename*. Si ya existe, truncarlo." #: ../Doc/library/test.rst:474 msgid "Count the number of open file descriptors." -msgstr "" +msgstr "Cuenta el número de descriptores de archivo abiertos." #: ../Doc/library/test.rst:479 msgid "Match *test* to patterns set in :func:`set_match_tests`." msgstr "" +"Hace coincidir *test* con los patrones establecidos en :func:" +"`set_match_tests`." #: ../Doc/library/test.rst:484 msgid "Define match test with regular expression *patterns*." msgstr "" +"Define una prueba de coincidencia con una expresión regular *patterns*." #: ../Doc/library/test.rst:489 msgid "" @@ -505,6 +682,9 @@ msgid "" "function scans the classes for methods starting with the prefix ``test_`` " "and executes the tests individually." msgstr "" +"Ejecuta subclases :class:`unittest.TestCase` pasadas a la función. La " +"función escanea las clases en busca de métodos que comiencen con el prefijo " +"``test_`` y ejecuta las pruebas individualmente." #: ../Doc/library/test.rst:493 msgid "" @@ -513,16 +693,22 @@ msgid "" "TestLoader.loadTestsFromModule()``. This is usually seen in the following :" "func:`test_main` function::" msgstr "" +"También está permitido pasar cadenas de caracteres como parámetros; Estas " +"deberían ser claves en ``sys.modules``. Cada módulo asociado será escaneado " +"por ``unittest.TestLoader.loadTestsFromModule()``. Esto generalmente se ve " +"en la siguiente función :func:`test_main`::" #: ../Doc/library/test.rst:501 msgid "This will run all tests defined in the named module." -msgstr "" +msgstr "Esto ejecutará todas las pruebas definidas en el módulo nombrado." #: ../Doc/library/test.rst:506 msgid "" "Run :func:`doctest.testmod` on the given *module*. Return ``(failure_count, " "test_count)``." msgstr "" +"Ejecuta :func:`doctest.testmod` en *module* dado. Retorna ``(failure_count, " +"test_count)``." #: ../Doc/library/test.rst:509 msgid "" @@ -531,18 +717,28 @@ msgid "" "``None``. *optionflags* is passed as ``optionflags`` to :func:`doctest." "testmod`." msgstr "" +"Si *verbosity* es ``None``, la :func:`doctest.testmod` se ejecuta con " +"*verbosity* establecido en :data:`verbose`. De lo contrario, se ejecuta con " +"verbosidad establecida en ``None``. *optionflags* se pasa como " +"``optionflags`` to :func:`doctest.testmod`." #: ../Doc/library/test.rst:517 msgid "" "Set the :func:`sys.setswitchinterval` to the given *interval*. Defines a " "minimum interval for Android systems to prevent the system from hanging." msgstr "" +"Establecido :func:`sys.setswitchinterval` en el *intervalo* dado. Define un " +"intervalo mínimo para los sistemas Android para evitar que el sistema se " +"cuelgue." #: ../Doc/library/test.rst:523 msgid "" "Use this check to guard CPython's implementation-specific tests or to run " "them only on the implementations guarded by the arguments::" msgstr "" +"Usa esta comprobación para proteger las pruebas específicas de " +"implementación de CPython o para ejecutarlas solo en las implementaciones " +"protegidas por los argumentos::" #: ../Doc/library/test.rst:533 msgid "" @@ -552,6 +748,12 @@ msgid "" "`warnings.simplefilter` set to ``always`` and with the option to " "automatically validate the results that are recorded." msgstr "" +"Un envoltorio de conveniencia para :func:`warnings.catch_warnings()` que " +"hace que sea más fácil probar que una advertencia se lanzó correctamente. Es " +"aproximadamente equivalente a llamar a ``warnings." +"catch_warnings(record=True)`` con :meth:`warnings.simplefilter` establecido " +"en ``always`` y con la opción de validar automáticamente los resultados que " +"se registran." #: ../Doc/library/test.rst:539 msgid "" @@ -564,14 +766,24 @@ msgid "" "specified filters the test fails. To disable the first of these checks, set " "*quiet* to ``True``." msgstr "" +"``check_warnings`` acepta 2 tuplas de la forma ``(\"mensaje regexp\", " +"WarningCategory)`` como argumentos posicionales. Si se proporcionan uno o " +"más *filters*, o si el argumento opcional de palabra clave *quiet* es " +"``False``, se verifica para asegurarse de que las advertencias sean las " +"esperadas: cada filtro especificado debe coincidir con al menos una de las " +"advertencias lanzadas por el código adjunto o la prueba falla, y si se " +"lanzan advertencias que no coinciden con ninguno de los filtros " +"especificados, la prueba falla. Para deshabilitar la primera de estas " +"comprobaciones, configure *quiet* en ``True``." #: ../Doc/library/test.rst:548 msgid "If no arguments are specified, it defaults to::" -msgstr "" +msgstr "Si no se especifican argumentos, el valor predeterminado es::" #: ../Doc/library/test.rst:552 msgid "In this case all warnings are caught and no errors are raised." msgstr "" +"En este caso, se capturan todas las advertencias y no se lanzaran errores." #: ../Doc/library/test.rst:554 msgid "" @@ -584,38 +796,56 @@ msgid "" "that would otherwise be expected on an object representing a warning will " "return ``None``." msgstr "" +"En la entrada al administrador de contexto, se devuelve una instancia de :" +"class:`WarningRecorder`. La lista de advertencias subyacentes de :func:" +"`~warnings.catch_warnings` está disponible a través del atributo :attr:" +"`warnings` del objeto del registrador. Como conveniencia, también se puede " +"acceder directamente a los atributos del objeto que representa la " +"advertencia más reciente a través del objeto grabador (vea el ejemplo a " +"continuación). Si no se ha lanzado ninguna advertencia, cualquiera de los " +"atributos que de otro modo se esperarían en un objeto que representa una " +"advertencia devolverá ``None``." #: ../Doc/library/test.rst:563 msgid "" "The recorder object also has a :meth:`reset` method, which clears the " "warnings list." msgstr "" +"El objeto grabador (*recorder object*) también tiene un método :meth:" +"`reset`, que borra la lista de advertencias." #: ../Doc/library/test.rst:566 msgid "The context manager is designed to be used like this::" -msgstr "" +msgstr "El administrador de contexto está diseñado para usarse así:" #: ../Doc/library/test.rst:573 msgid "" "In this case if either warning was not raised, or some other warning was " "raised, :func:`check_warnings` would raise an error." msgstr "" +"En este caso, si no se generó ninguna advertencia, o si surgió alguna otra " +"advertencia, :func:`check_warnings` lanzaría un error." #: ../Doc/library/test.rst:576 msgid "" "When a test needs to look more deeply into the warnings, rather than just " "checking whether or not they occurred, code like this can be used::" msgstr "" +"Cuando una prueba necesita analizar más profundamente las advertencias, en " +"lugar de simplemente verificar si ocurrieron o no, se puede usar un código " +"como este::" #: ../Doc/library/test.rst:590 msgid "" "Here all warnings will be caught, and the test code tests the captured " "warnings directly." msgstr "" +"Aquí se capturarán todas las advertencias, y el código de prueba prueba las " +"advertencias capturadas directamente." #: ../Doc/library/test.rst:593 msgid "New optional arguments *filters* and *quiet*." -msgstr "" +msgstr "Nuevos argumentos opcionales *filters* y *quiet*." #: ../Doc/library/test.rst:599 msgid "" @@ -623,24 +853,33 @@ msgid "" "must remove the object which may emit :exc:`ResourceWarning` before the end " "of the context manager." msgstr "" +"Gestor de contexto para comprobar que no se ha lanzado un :exc:" +"`ResourceWarning` . Debe eliminar el objeto que puede emitir :exc:" +"`ResourceWarning` antes del final del administrador de contexto." #: ../Doc/library/test.rst:606 msgid "" "Set the values for :data:`max_memuse` and :data:`real_max_memuse` for big " "memory tests." msgstr "" +"Establece los valores para :data:`max_memuse` y :data:`real_max_memuse` para " +"pruebas de memoria grande." #: ../Doc/library/test.rst:612 msgid "" "Store the value from *stdout*. It is meant to hold the stdout at the time " "the regrtest began." msgstr "" +"Almacene el valor de *stdout*. Está destinado a mantener el *stdout* en el " +"momento en que comenzó el regrtest." #: ../Doc/library/test.rst:618 msgid "" "Return the original stdout set by :func:`record_original_stdout` or ``sys." "stdout`` if it's not set." msgstr "" +"Retorna el *stdout* original establecido por :func:`record_original_stdout` " +"o ``sys.stdout`` si no está configurado." #: ../Doc/library/test.rst:624 msgid "" @@ -648,38 +887,49 @@ msgid "" "by the interpreter. This will typically be run on the result of :meth:" "`subprocess.Popen.communicate`." msgstr "" +"Elimine el *stderr* de un proceso de Python de la salida de depuración " +"potencial emitida por el intérprete. Esto normalmente se ejecutará en el " +"resultado de :meth:`subprocess.Popen.communicate`." #: ../Doc/library/test.rst:631 msgid "" "Return a list of command line arguments reproducing the current settings in " "``sys.flags`` and ``sys.warnoptions``." msgstr "" +"Retorna una lista de argumentos de línea de comandos que reproducen la " +"configuración actual en ``sys.flags`` y ``sys.warnoptions``." #: ../Doc/library/test.rst:637 msgid "" "Return a list of command line arguments reproducing the current optimization " "settings in ``sys.flags``." msgstr "" +"Retorna una lista de argumentos de línea de comandos que reproducen la " +"configuración de optimización actual en ``sys.flags``." #: ../Doc/library/test.rst:645 msgid "" "A context managers that temporarily replaces the named stream with :class:" "`io.StringIO` object." msgstr "" +"Un administrador de contexto que reemplaza temporalmente la secuencia " +"nombrada con un objeto :class:`io.StringIO`." #: ../Doc/library/test.rst:648 msgid "Example use with output streams::" -msgstr "" +msgstr "Ejemplo de uso con flujos de salida::" #: ../Doc/library/test.rst:656 msgid "Example use with input stream::" -msgstr "" +msgstr "Ejemplo de uso con flujo de entrada::" #: ../Doc/library/test.rst:668 msgid "" "A context manager that creates a temporary directory at *path* and yields " "the directory." msgstr "" +"Un administrador de contexto que crea un directorio temporal en *path* y " +"produce el directorio." #: ../Doc/library/test.rst:671 msgid "" @@ -688,12 +938,18 @@ msgid "" "exception on error. Otherwise, if *path* is specified and cannot be " "created, only a warning is issued." msgstr "" +"Si *path* es ``None``, el directorio temporal se crea usando :func:`tempfile." +"mkdtemp`. Si *quiet* es ``False``, el administrador de contexto lanza una " +"excepción en caso de error. De lo contrario, si se especifica *path* y no se " +"puede crear, solo se emite una advertencia." #: ../Doc/library/test.rst:679 msgid "" "A context manager that temporarily changes the current working directory to " "*path* and yields the directory." msgstr "" +"Un administrador de contexto que cambia temporalmente el directorio de " +"trabajo actual a *path* y produce el directorio." #: ../Doc/library/test.rst:682 msgid "" @@ -701,12 +957,17 @@ msgid "" "Otherwise, it issues only a warning and keeps the current working directory " "the same." msgstr "" +"Si *quiet* es ``False``, el administrador de contexto lanza una excepción en " +"caso de error. De lo contrario, solo emite una advertencia y mantiene el " +"directorio de trabajo actual igual." #: ../Doc/library/test.rst:689 msgid "" "A context manager that temporarily creates a new directory and changes the " "current working directory (CWD)." msgstr "" +"Un administrador de contexto que crea temporalmente un nuevo directorio y " +"cambia el directorio de trabajo actual (*CWD*)." #: ../Doc/library/test.rst:692 msgid "" @@ -715,6 +976,10 @@ msgid "" "If *name* is ``None``, the temporary directory is created using :func:" "`tempfile.mkdtemp`." msgstr "" +"El administrador de contexto crea un directorio temporal en el directorio " +"actual con el nombre *name* antes de cambiar temporalmente el directorio de " +"trabajo actual. Si *name* es ``None`` , el directorio temporal se crea " +"usando :func:`tempfile.mkdtemp`." #: ../Doc/library/test.rst:697 msgid "" @@ -722,20 +987,28 @@ msgid "" "an error is raised. Otherwise, only a warning is raised and the original " "CWD is used." msgstr "" +"Si *quiet* es ``False`` y no es posible crear o cambiar el *CWD*, se lanza " +"un error. De lo contrario, solo se lanza una advertencia y se utiliza el " +"*CWD* original." #: ../Doc/library/test.rst:704 msgid "A context manager that temporarily sets the process umask." msgstr "" +"Un administrador de contexto que establece temporalmente el proceso *umask*." #: ../Doc/library/test.rst:709 msgid "" "A context manager that raises :exc:`ResourceDenied` when various issues with " "the internet connection manifest themselves as exceptions." msgstr "" +"Un administrador de contexto que plantea :exc:`ResourceDenied` cuando varios " +"problemas con la conexión a Internet se manifiestan como excepciones." #: ../Doc/library/test.rst:715 msgid "A context manager that replaces ``sys.stderr`` with ``sys.__stderr__``." msgstr "" +"Un administrador de contexto que remplaza ``sys.stderr`` con ``sys." +"__stderr__``." #: ../Doc/library/test.rst:720 msgid "" @@ -744,21 +1017,29 @@ msgid "" "that ``__del__`` methods may be called later than expected and weakrefs may " "remain alive for longer than expected." msgstr "" +"Se fuerza la mayor cantidad posible de objetos para ser recolectados. Esto " +"es necesario porque el recolector de basura no garantiza la desasignación " +"oportuna. Esto significa que los métodos ``__del__`` pueden llamarse más " +"tarde de lo esperado y las referencias débiles pueden permanecer vivas por " +"más tiempo de lo esperado." #: ../Doc/library/test.rst:728 msgid "" "A context manager that disables the garbage collector upon entry and " "reenables it upon exit." msgstr "" +"Un administrador de contexto que deshabilita el recolector de basura al " +"entrar y lo vuelve a habilitar al salir." #: ../Doc/library/test.rst:734 msgid "Context manager to swap out an attribute with a new object." msgstr "" +"Administrador de contexto para intercambiar un atributo con un nuevo objeto." #: ../Doc/library/test.rst:736 ../Doc/library/test.rst:754 #: ../Doc/library/test.rst:1117 ../Doc/library/test.rst:1147 msgid "Usage::" -msgstr "" +msgstr "Uso::" #: ../Doc/library/test.rst:741 msgid "" @@ -766,16 +1047,22 @@ msgid "" "restoring the old value at the end of the block. If ``attr`` doesn't exist " "on ``obj``, it will be created and then deleted at the end of the block." msgstr "" +"Esto establecerá ``obj.attr`` en 5 durante la duración del bloque ``with``, " +"restaurando el valor anterior al final del bloque. Si ``attr`` no existe en " +"``obj``, se creará y luego se eliminará al final del bloque." #: ../Doc/library/test.rst:746 ../Doc/library/test.rst:764 msgid "" "The old value (or ``None`` if it doesn't exist) will be assigned to the " "target of the \"as\" clause, if there is one." msgstr "" +"El valor anterior (o ``None`` si no existe) se asignará al objetivo de la " +"cláusula \"como\", si existe." #: ../Doc/library/test.rst:752 msgid "Context manager to swap out an item with a new object." msgstr "" +"Administrador de contexto para intercambiar un elemento con un nuevo objeto." #: ../Doc/library/test.rst:759 msgid "" @@ -783,58 +1070,79 @@ msgid "" "restoring the old value at the end of the block. If ``item`` doesn't exist " "on ``obj``, it will be created and then deleted at the end of the block." msgstr "" +"Esto establecerá ``obj [\"item\"]`` a 5 durante la duración del bloque " +"``with``, restaurando el valor anterior al final del bloque. Si ``item`` no " +"existe en ``obj``, se creará y luego se eliminará al final del bloque." #: ../Doc/library/test.rst:770 msgid "" "Context manager to wait until all threads created in the ``with`` statement " "exit." msgstr "" +"El administrador de contexto debe esperar hasta que salgan todos los hilos " +"creados en la declaración ``with``." #: ../Doc/library/test.rst:776 msgid "" "Context manager to start *threads*. It attempts to join the threads upon " "exit." msgstr "" +"Administrador de contexto para iniciar *threads*. Intenta unir los hilos al " +"salir." #: ../Doc/library/test.rst:782 msgid "" "Return :func:`struct.calcsize` for ``nP{fmt}0n`` or, if ``gettotalrefcount`` " "exists, ``2PnP{fmt}0P``." msgstr "" +"Retorna :func:`struct.calcsize` para ``nP{fmt}0n`` o, si " +"``gettotalrefcount`` existe, ``2PnP{fmt}0P``." #: ../Doc/library/test.rst:788 msgid "" "Return :func:`struct.calcsize` for ``nPn{fmt}0n`` or, if " "``gettotalrefcount`` exists, ``2PnPn{fmt}0P``." msgstr "" +"Retorna :func:`struct.calcsize` para ``nPn{fmt}0n`` o, si " +"``gettotalrefcount`` existe, ``2PnPn{fmt}0P``." #: ../Doc/library/test.rst:794 msgid "" "For testcase *test*, assert that the ``sys.getsizeof`` for *o* plus the GC " "header size equals *size*." msgstr "" +"Para el caso de prueba (*testcase*), se aserciona que el ``sys.getsizeof`` " +"para *o* más el tamaño del encabezado *GC* es igual a *size*." #: ../Doc/library/test.rst:800 msgid "Return ``True`` if the OS supports symbolic links, ``False`` otherwise." msgstr "" +"Retorna ``True`` si el sistema operativo admite links simbólicos, de lo " +"contrario ``False``." #: ../Doc/library/test.rst:806 msgid "Return ``True`` if the OS supports xattr, ``False`` otherwise." msgstr "" +"Retorna ``True`` si el sistema operativo admite *xattr*, de lo contrario " +"``False``." #: ../Doc/library/test.rst:812 msgid "A decorator for running tests that require support for symbolic links." msgstr "" +"Un decorador para ejecutar pruebas que requieren soporte para enlaces " +"simbólicos." #: ../Doc/library/test.rst:817 msgid "A decorator for running tests that require support for xattr." -msgstr "" +msgstr "Un decorador para ejecutar pruebas que requieren soporte para *xattr*." #: ../Doc/library/test.rst:822 msgid "" "A decorator for running tests that require a functional bind() for Unix " "sockets." msgstr "" +"Un decorador para ejecutar pruebas que requieren un enlace *bind()* para " +"*sockets Unix*." #: ../Doc/library/test.rst:828 msgid "" @@ -842,6 +1150,9 @@ msgid "" "expectedFailure`. Any use of this decorator should have an associated " "comment identifying the relevant tracker issue." msgstr "" +"Un decorador para marcar condicionalmente las pruebas con :func:`unittest." +"expectedFailure`. Cualquier uso de este decorador debe tener un comentario " +"asociado que identifique el problema relevante del rastreador." #: ../Doc/library/test.rst:835 msgid "" @@ -850,72 +1161,90 @@ msgid "" "string (for example ``\"LC_ALL\"``). The *locales* passed will be tried " "sequentially, and the first valid locale will be used." msgstr "" +"Un decorador para ejecutar una función en una configuración regional " +"diferente, restableciéndola correctamente una vez que ha finalizado. " +"*catstr* es la categoría de configuración regional como una cadena (por " +"ejemplo, ``\"LC_ALL\"``). Las *locales* aprobadas se probarán " +"secuencialmente y se utilizará la primera configuración regional válida." #: ../Doc/library/test.rst:843 msgid "" "A decorator for running a function in a specific timezone, correctly " "resetting it after it has finished." msgstr "" +"Un decorador para ejecutar una función en una zona horaria específica, " +"restableciéndola correctamente una vez que haya finalizado." #: ../Doc/library/test.rst:849 msgid "" "Decorator for the minimum version when running test on FreeBSD. If the " "FreeBSD version is less than the minimum, raise :exc:`unittest.SkipTest`." msgstr "" +"Decorador para la versión mínima cuando se ejecuta la prueba en FreeBSD. Si " +"la versión de FreeBSD es inferior al mínimo, aumente :exc:`unittest." +"SkipTest`." #: ../Doc/library/test.rst:855 msgid "" "Decorator for the minimum version when running test on Linux. If the Linux " "version is less than the minimum, raise :exc:`unittest.SkipTest`." msgstr "" +"Decorador para la versión mínima cuando se ejecuta la prueba en Linux. Si la " +"versión de Linux es inferior al mínimo, aumente :exc:`unittest.SkipTest`." #: ../Doc/library/test.rst:861 msgid "" "Decorator for the minimum version when running test on Mac OS X. If the MAC " "OS X version is less than the minimum, raise :exc:`unittest.SkipTest`." msgstr "" +"Decorador para la versión mínima cuando se ejecuta la prueba en Mac OS X. Si " +"la versión MAC OS X es menor que la mínima, genere :exc:`unittest.SkipTest`." #: ../Doc/library/test.rst:867 msgid "Decorator for skipping tests on non-IEEE 754 platforms." -msgstr "" +msgstr "Decorador para omitir pruebas en plataformas que no son *IEEE 754*." #: ../Doc/library/test.rst:872 msgid "Decorator for skipping tests if :mod:`zlib` doesn't exist." -msgstr "" +msgstr "Decorador para omitir pruebas si :mod:`zlib` no existe." #: ../Doc/library/test.rst:877 msgid "Decorator for skipping tests if :mod:`gzip` doesn't exist." -msgstr "" +msgstr "Decorador para omitir pruebas si :mod:`gzip` no existe." #: ../Doc/library/test.rst:882 msgid "Decorator for skipping tests if :mod:`bz2` doesn't exist." -msgstr "" +msgstr "Decorador para omitir pruebas si :mod:`bz2` no existe." #: ../Doc/library/test.rst:887 msgid "Decorator for skipping tests if :mod:`lzma` doesn't exist." -msgstr "" +msgstr "Decorador para omitir pruebas si :mod:`lzma` no existe." #: ../Doc/library/test.rst:892 msgid "Decorator for skipping tests if *resource* is not available." -msgstr "" +msgstr "Decorador para omitir pruebas si *resource* no está disponible." #: ../Doc/library/test.rst:897 msgid "Decorator for only running the test if :data:`HAVE_DOCSTRINGS`." -msgstr "" +msgstr "Decorador para ejecutar solo la prueba si :data:`HAVE_DOCSTRINGS`." #: ../Doc/library/test.rst:902 msgid "Decorator for tests only applicable to CPython." -msgstr "" +msgstr "Decorador para pruebas solo aplicable a CPython." #: ../Doc/library/test.rst:907 msgid "" "Decorator for invoking :func:`check_impl_detail` on *guards*. If that " "returns ``False``, then uses *msg* as the reason for skipping the test." msgstr "" +"Decorador para invocar :func:`check_impl_detail` en *guards*. Si eso " +"devuelve ``False``, entonces usa *msg* como la razón para omitir la prueba." #: ../Doc/library/test.rst:913 msgid "Decorator to temporarily turn off tracing for the duration of the test." msgstr "" +"Decorador para desactivar temporalmente el seguimiento durante la duración " +"de la prueba." #: ../Doc/library/test.rst:918 msgid "" @@ -924,14 +1253,20 @@ msgid "" "for the duration of the test to prevent unexpected refcounts caused by the " "trace function." msgstr "" +"Decorador para pruebas que implican conteo de referencias. El decorador no " +"ejecuta la prueba si CPython no la ejecuta. Cualquier función de rastreo no " +"se establece durante la duración de la prueba para evitar conteos de " +"referencia(*refcounts*) inesperados causados ​​por la función de rastreo." #: ../Doc/library/test.rst:926 msgid "Decorator to ensure the threads are cleaned up even if the test fails." msgstr "" +"Decorador para garantizar que los hilos se limpien incluso si la prueba " +"falla." #: ../Doc/library/test.rst:931 msgid "Decorator for bigmem tests." -msgstr "" +msgstr "Decorador para pruebas *bigmem*." #: ../Doc/library/test.rst:933 msgid "" @@ -940,6 +1275,11 @@ msgid "" "estimate of it. For example, a test that needs two byte buffers, of 4 GiB " "each, could be decorated with ``@bigmemtest(size=_4G, memuse=2)``." msgstr "" +"*size* es un tamaño solicitado para la prueba (en unidades arbitrarias " +"interpretadas por la prueba). *memuse* es el número de bytes por unidad para " +"la prueba, o una buena estimación de la misma. Por ejemplo, una prueba que " +"necesita dos búfers de byte, de 4 *GiB* cada uno, podría decorarse con " +"``@bigmemtest(size=_4G, memuse=2)``." #: ../Doc/library/test.rst:938 msgid "" @@ -948,18 +1288,27 @@ msgid "" "method may be less than the requested value. If *dry_run* is ``False``, it " "means the test doesn't support dummy runs when ``-M`` is not specified." msgstr "" +"El argumento *size* normalmente se pasa al método de prueba decorado como un " +"argumento adicional. Si *dry_run* es ``True``, el valor pasado al método de " +"prueba puede ser menor que el valor solicitado. Si *dry_run* es ``False``, " +"significa que la prueba no admite ejecuciones ficticias cuando no se " +"especifica ``-M``." #: ../Doc/library/test.rst:946 msgid "" "Decorator for tests that fill the address space. *f* is the function to " "wrap." msgstr "" +"Decorador para pruebas que llenan el espacio de direcciones. *f* es la " +"función para envolver." #: ../Doc/library/test.rst:952 msgid "" "Create an invalid file descriptor by opening and closing a temporary file, " "and returning its descriptor." msgstr "" +"Se crea un descriptor de archivo no válido abriendo y cerrando un archivo " +"temporal y retornando su descriptor." #: ../Doc/library/test.rst:958 msgid "" @@ -970,6 +1319,12 @@ msgid "" "line of the exception. If *offset* is not ``None``, compares to the offset " "of the exception." msgstr "" +"Prueba los errores de sintaxis en *statement* intentando compilar " +"*statement*. *testcase* es la instancia :mod:`unittest` para la prueba. " +"*errtext* es la expresión regular que debe coincidir con la representación " +"de cadena de caracteres que es lanza en :exc:`SyntaxError`. Si *lineno* no " +"es ``None``, se compara con la línea de la excepción. Si *offset* no es " +"``None``, se compara con el desplazamiento de la excepción." #: ../Doc/library/test.rst:968 msgid "" @@ -982,10 +1337,18 @@ msgid "" "compares to the line of the warning and exception. If *offset* is not " "``None``, compares to the offset of the exception." msgstr "" +"Prueba la advertencia de sintaxis en *statement* intentando compilar " +"*statement*. Pruebe también que :exc:`SyntaxWarning` se emite solo una vez, " +"y que se convertirá en :exc:`SyntaxError` cuando se convierta en error. " +"*testcase* es la instancia :mod:`unittest` para la prueba. *errtext* es la " +"expresión regular que debe coincidir con la representación de cadena del " +"emitido :exc:`SyntaxWarning` y lanza :exc:`SyntaxError` . Si *lineno* no es " +"``None``, se compara con la línea de advertencia y excepción. Si *offset* no " +"es ``None``, se compara con el desplazamiento de la excepción." #: ../Doc/library/test.rst:982 msgid "Open *url*. If open fails, raises :exc:`TestFailed`." -msgstr "" +msgstr "Abre *url*. Si la apertura falla, se lanza :exc:`TestFailed`." #: ../Doc/library/test.rst:987 msgid "" @@ -993,6 +1356,9 @@ msgid "" "this function raises :exc:`unittest.SkipTest` if the module cannot be " "imported." msgstr "" +"Esta función importa y devuelve el módulo nombrado. A diferencia de una " +"importación normal, esta función lanza :exc:`unittest.SkipTest` si el módulo " +"no se puede importar." #: ../Doc/library/test.rst:991 msgid "" @@ -1001,6 +1367,11 @@ msgid "" "optional for others, set *required_on* to an iterable of platform prefixes " "which will be compared against :data:`sys.platform`." msgstr "" +"Los mensajes de deprecación de módulos y paquetes se suprimen durante esta " +"importación si *deprecated* es ``True``. Si se requiere un módulo en una " +"plataforma pero es opcional para otros, establezca *required_on* en un " +"iterable de prefijos de plataforma que se compararán con :data:`sys." +"platform`." #: ../Doc/library/test.rst:1001 msgid "" @@ -1009,12 +1380,18 @@ msgid "" "that unlike :func:`reload`, the original module is not affected by this " "operation." msgstr "" +"Esta función importa y devuelve una copia nueva del módulo Python nombrado " +"eliminando el módulo nombrado de ``sys.modules`` antes de realizar la " +"importación. Tenga en cuenta que a diferencia de :func:`reload`, el módulo " +"original no se ve afectado por esta operación." #: ../Doc/library/test.rst:1006 msgid "" "*fresh* is an iterable of additional module names that are also removed from " "the ``sys.modules`` cache before doing the import." msgstr "" +"*fresh* es un iterable de nombres de módulos adicionales que también se " +"eliminan del caché ``sys.modules`` antes de realizar la importación." #: ../Doc/library/test.rst:1009 msgid "" @@ -1022,6 +1399,9 @@ msgid "" "the module cache during the import to ensure that attempts to import them " "raise :exc:`ImportError`." msgstr "" +"*bloqueado* es un iterable de nombres de módulos que se reemplazan con " +"``None`` en la memoria caché del módulo durante la importación para " +"garantizar que los intentos de importarlos generen :exc:`ImportError`." #: ../Doc/library/test.rst:1013 msgid "" @@ -1029,48 +1409,62 @@ msgid "" "parameters are saved before starting the import and then reinserted into " "``sys.modules`` when the fresh import is complete." msgstr "" +"El módulo nombrado y los módulos nombrados en los parámetros *fresh* y " +"*bloqueado* se guardan antes de comenzar la importación y luego se vuelven a " +"insertar en ``sys.modules`` cuando se completa la importación fresca." #: ../Doc/library/test.rst:1017 msgid "" "Module and package deprecation messages are suppressed during this import if " "*deprecated* is ``True``." msgstr "" +"Los mensajes de deprecación de módulos y paquetes se suprimen durante esta " +"importación si *deprecated* es ``True``." #: ../Doc/library/test.rst:1020 msgid "" "This function will raise :exc:`ImportError` if the named module cannot be " "imported." msgstr "" +"Esta función lanzará :exc:`ImportError` si el módulo nombrado no puede " +"importarse." #: ../Doc/library/test.rst:1023 ../Doc/library/test.rst:1264 msgid "Example use::" -msgstr "" +msgstr "Ejemplo de uso::" #: ../Doc/library/test.rst:1037 msgid "Return a copy of :data:`sys.modules`." -msgstr "" +msgstr "Retorna una copia de :data:`sys.modules`." #: ../Doc/library/test.rst:1042 msgid "" "Remove modules except for *oldmodules* and ``encodings`` in order to " "preserve internal cache." msgstr "" +"Elimina los módulos a excepción de *oldmodules* y ``encodings`` para " +"preservar la memoria caché interna." #: ../Doc/library/test.rst:1048 msgid "Return current thread count and copy of dangling threads." -msgstr "" +msgstr "Retorna el recuento del hilo actual y copia de subprocesos colgantes." #: ../Doc/library/test.rst:1053 msgid "" "Cleanup up threads not specified in *original_values*. Designed to emit a " "warning if a test leaves running threads in the background." msgstr "" +"Se limpia los hilos no especificados en *original_values*. Diseñado para " +"emitir una advertencia si una prueba deja hilos en ejecución en segundo " +"plano." #: ../Doc/library/test.rst:1059 msgid "" "Join a *thread* within *timeout*. Raise an :exc:`AssertionError` if thread " "is still alive after *timeout* seconds." msgstr "" +"Se une un *thread* dentro de *timeout*. Lanza un :exc:`AssertionError` si el " +"hilo sigue vivo después de unos segundos de *timeout*." #: ../Doc/library/test.rst:1065 msgid "" @@ -1078,12 +1472,18 @@ msgid "" "This will help ensure that no extra children (zombies) stick around to hog " "resources and create problems when looking for refleaks." msgstr "" +"Se utiliza esto al final de ``test_main`` siempre que se inicien " +"subprocesos. Esto ayudará a garantizar que ningún proceso hijo adicional " +"(zombies) se quede para acumular recursos y crear problemas al buscar " +"refleaks." #: ../Doc/library/test.rst:1072 msgid "" "Get an attribute, raising :exc:`unittest.SkipTest` if :exc:`AttributeError` " "is raised." msgstr "" +"Obtiene un atributo, lanzando :exc:`unittest.SkipTest` si :exc:" +"`AttributeError` está activado." #: ../Doc/library/test.rst:1078 msgid "" @@ -1097,6 +1497,16 @@ msgid "" "options for TCP/IP sockets. The only case for setting these options is " "testing multicasting via multiple UDP sockets." msgstr "" +"Se enlaza el *socket* a un puerto libre y retorna el número de puerto. Se " +"basa en puertos efímeros para garantizar que estemos utilizando un puerto " +"independiente. Esto es importante ya que muchas pruebas pueden ejecutarse " +"simultáneamente, especialmente en un entorno *buildbot*. Este método lanza " +"una excepción si ``sock.family`` es :const:`~ socket.AF_INET` y ``sock." +"type`` es :const:`~ socket.SOCK_STREAM`, y el *socket* tiene :const:`~socket." +"SO_REUSEADDR` o :const:`~socket.SO_REUSEPORT` establecido en él. Las pruebas " +"nunca deben configurar estas opciones de *socket* para los *sockets TCP/IP*. " +"El único caso para configurar estas opciones es probar la multidifusión " +"(*multicasting*) a través de múltiples *sockets UDP*." #: ../Doc/library/test.rst:1089 msgid "" @@ -1105,52 +1515,63 @@ msgid "" "prevent anyone else from binding to our host/port for the duration of the " "test." msgstr "" +"Además, si la opción de *socket* :const:`~ socket.SO_EXCLUSIVEADDRUSE` está " +"disponible (es decir, en Windows), se establecerá en el *socket*. Esto " +"evitará que otras personas se vinculen a nuestro host/puerto mientras dure " +"la prueba." #: ../Doc/library/test.rst:1097 msgid "" "Bind a unix socket, raising :exc:`unittest.SkipTest` if :exc:" "`PermissionError` is raised." msgstr "" +"Enlace un *socket* Unix, lanzando :exc:`unittest.SkipTest` si :exc:" +"`PermissionError` es lanzado." #: ../Doc/library/test.rst:1103 msgid "" "Context manager catching :class:`threading.Thread` exception using :func:" "`threading.excepthook`." msgstr "" +"El administrador de contexto captura :class:`threading.Thread` excepción " +"usando :func:`threading.excepthook`." #: ../Doc/library/test.rst:1106 msgid "Attributes set when an exception is catched:" -msgstr "" +msgstr "Atributos establecidos cuando se detecta una excepción:" #: ../Doc/library/test.rst:1108 msgid "``exc_type``" -msgstr "" +msgstr "``exc_type``" #: ../Doc/library/test.rst:1109 msgid "``exc_value``" -msgstr "" +msgstr "``exc_value``" #: ../Doc/library/test.rst:1110 msgid "``exc_traceback``" -msgstr "" +msgstr "``exc_traceback``" #: ../Doc/library/test.rst:1111 msgid "``thread``" -msgstr "" +msgstr "``thread``" #: ../Doc/library/test.rst:1113 msgid "See :func:`threading.excepthook` documentation." -msgstr "" +msgstr "Consulte la documentación para :func:`threading.excepthook`." #: ../Doc/library/test.rst:1115 msgid "These attributes are deleted at the context manager exit." msgstr "" +"Estos atributos se eliminan en la salida del administrador de contexto." #: ../Doc/library/test.rst:1136 msgid "" "Context manager catching unraisable exception using :func:`sys." "unraisablehook`." msgstr "" +"El administrador de contexto detectando excepciones imposibles de evaluar " +"usando :func:`sys.unraisablehook`." #: ../Doc/library/test.rst:1139 msgid "" @@ -1158,6 +1579,9 @@ msgid "" "reference cycle. The reference cycle is broken explicitly when the context " "manager exits." msgstr "" +"El almacenamiento del valor de excepción (``cm.unraisable.exc_value``) crea " +"un ciclo de referencia. El ciclo de referencia se interrumpe explícitamente " +"cuando sale el administrador de contexto." #: ../Doc/library/test.rst:1143 msgid "" @@ -1165,6 +1589,9 @@ msgid "" "to an object which is being finalized. Exiting the context manager clears " "the stored object." msgstr "" +"El almacenamiento del objeto (``cm.unraisable.object``) puede resucitarlo si " +"se establece en un objeto que se está finalizando. Salir del administrador " +"de contexto borra el objeto almacenado." #: ../Doc/library/test.rst:1164 msgid "" @@ -1176,6 +1603,13 @@ msgid "" "the OS. The temporary socket is then closed and deleted, and the ephemeral " "port is returned." msgstr "" +"Retorna un puerto no utilizado que debería ser adecuado para el enlace. Esto " +"se logra creando un *socket* temporal con la misma familia y tipo que el " +"parámetro ``sock`` (el valor predeterminado es :const:`~socket.AF_INET`, :" +"const:`~socket.SOCK_STREAM`) y vinculándolo a la dirección de host " +"especificada (por defecto es ``0.0.0.0``) con el puerto establecido en 0, " +"provocando un puerto efímero no utilizado del sistema operativo. El *socket* " +"temporal se cierra y se elimina, y se devuelve el puerto efímero." #: ../Doc/library/test.rst:1173 msgid "" @@ -1189,6 +1623,16 @@ msgid "" "since it can make multiple instances of the test impossible to run " "simultaneously, which is a problem for buildbots." msgstr "" +"Este método o :func:`bind_port` debe usarse para cualquier prueba en la que " +"un *socket* del servidor deba estar vinculado a un puerto en particular " +"durante la duración de la prueba. Cuál usar depende de si el código de " +"llamada está creando un *socket* Python, o si un puerto no utilizado debe " +"proporcionarse en un constructor o pasar a un programa externo (es decir, el " +"argumento ``-accept`` al modo *s_server de openssl*). Siempre es preferible :" +"func:`bind_port` sobre :​​func:`find_unused_port` donde sea posible. Se " +"desaconseja el uso de un puerto codificado ya que puede hacer que varias " +"instancias de la prueba sean imposibles de ejecutar simultáneamente, lo cual " +"es un problema para los *buildbots*." #: ../Doc/library/test.rst:1187 msgid "" @@ -1198,10 +1642,17 @@ msgid "" "``load_tests``. In simple cases, the test package's ``__init__.py`` can be " "the following::" msgstr "" +"La implementación genérica del protocolo :mod:`unittest` ``load_tests`` para " +"usar en paquetes de prueba. *pkg_dir* es el directorio raíz del paquete; " +"*loader*, *standard_tests* y *pattern* son los argumentos esperados por " +"``load_tests``. En casos simples, el paquete de prueba ``__init __. Py`` " +"puede ser el siguiente::" #: ../Doc/library/test.rst:1202 msgid "Return ``True`` if the file system for *directory* is case-insensitive." msgstr "" +"Retorna ``True`` si el sistema de archivos para *directory* no distingue " +"entre mayúsculas y minúsculas." #: ../Doc/library/test.rst:1207 msgid "" @@ -1209,12 +1660,18 @@ msgid "" "on *other_api*, except for a defined list of items to be ignored in this " "check specified in *ignore*." msgstr "" +"Retorna el conjunto de atributos, funciones o métodos de *ref_api* que no se " +"encuentra en *other_api *, excepto por una lista definida de elementos que " +"se ignorarán en esta comprobación especificada en *ignore*." #: ../Doc/library/test.rst:1211 msgid "" "By default this skips private attributes beginning with '_' but includes all " "magic methods, i.e. those starting and ending in '__'." msgstr "" +"De forma predeterminada, omite los atributos privados que comienzan con '_' " +"pero incluye todos los métodos mágicos, es decir, los que comienzan y " +"terminan en '__'." #: ../Doc/library/test.rst:1219 msgid "" @@ -1222,16 +1679,22 @@ msgid "" "procedure to *test_instance* to restore *object_to_patch* for *attr_name*. " "The *attr_name* should be a valid attribute for *object_to_patch*." msgstr "" +"Se anula *object_to_patch.attr_name* con *new_value*. Se agrega también el " +"procedimiento de limpieza a *test_instance* para restaurar *object_to_patch* " +"para *attr_name*. *Attr_name* debe ser un atributo válido para " +"*object_to_patch*." #: ../Doc/library/test.rst:1227 msgid "" "Run *code* in subinterpreter. Raise :exc:`unittest.SkipTest` if :mod:" "`tracemalloc` is enabled." msgstr "" +"Ejecuta *code* en el subinterpretador. Lanza :exc:`unittest.SkipTest` si :" +"mod:`tracemalloc` está habilitado." #: ../Doc/library/test.rst:1233 msgid "Assert that *iter* is deallocated after iterating." -msgstr "" +msgstr "Aserciona que *iter* se desasigna después de iterar." #: ../Doc/library/test.rst:1238 msgid "" @@ -1239,17 +1702,26 @@ msgid "" "in *cmd_names* or all the compiler executables when *cmd_names* is empty and " "return the first missing executable or ``None`` when none is found missing." msgstr "" +"Verifica la existencia de los ejecutables del compilador cuyos nombres " +"figuran en *cmd_names* o todos los ejecutables del compilador cuando " +"*cmd_names* está vacío y retorna el primer ejecutable faltante o ``None`` " +"cuando no se encuentra ninguno." #: ../Doc/library/test.rst:1246 msgid "" "Assert that the ``__all__`` variable of *module* contains all public names." msgstr "" +"Aserciona que la variable ``_all__`` de *module* contiene todos los nombres " +"públicos." #: ../Doc/library/test.rst:1248 msgid "" "The module's public names (its API) are detected automatically based on " "whether they match the public name convention and were defined in *module*." msgstr "" +"Los nombres públicos del módulo (su API) se detectan automáticamente en " +"función de si coinciden con la convención de nombres públicos y se " +"definieron en *module*." #: ../Doc/library/test.rst:1252 msgid "" @@ -1258,6 +1730,11 @@ msgid "" "API. One case for this is when *module* imports part of its public API from " "other modules, possibly a C backend (like ``csv`` and its ``_csv``)." msgstr "" +"El argumento *name_of_module* puede especificar (como una cadena o tupla del " +"mismo) qué módulo(s) se podría definir una API para ser detectada como una " +"API pública. Un caso para esto es cuando *module* importa parte de su API " +"pública desde otros módulos, posiblemente un *backend de C* (como ``csv`` y " +"su ``_csv``)." #: ../Doc/library/test.rst:1257 msgid "" @@ -1266,16 +1743,23 @@ msgid "" "``__module__`` attribute. If provided, it will be added to the automatically " "detected ones." msgstr "" +"El argumento *extra* puede ser un conjunto de nombres que de otro modo no se " +"detectarían automáticamente como \"públicos\" (*\"public\"*), como objetos " +"sin un atributo adecuado ``__module__``. Si se proporciona, se agregará a " +"los detectados automáticamente." #: ../Doc/library/test.rst:1261 msgid "" "The *blacklist* argument can be a set of names that must not be treated as " "part of the public API even though their names indicate otherwise." msgstr "" +"El argumento *blacklist* puede ser un conjunto de nombres que no deben " +"tratarse como parte de la API pública aunque sus nombres indiquen lo " +"contrario." #: ../Doc/library/test.rst:1286 msgid "The :mod:`test.support` module defines the following classes:" -msgstr "" +msgstr "El módulo :mod:`test.support` define las siguientes clases:" #: ../Doc/library/test.rst:1290 msgid "" @@ -1285,6 +1769,12 @@ msgid "" "the :keyword:`with` statement. Only if all pairs match properly against " "attributes on the exception is :exc:`ResourceDenied` raised." msgstr "" +"Las instancias son un administrador de contexto que lanza :exc:" +"`ResourceDenied` si se lanza el tipo de excepción especificado. Cualquier " +"argumento de palabra clave se trata como pares de atributo / valor para " +"compararlo con cualquier excepción lanzada dentro de :keyword:`with`. Solo " +"si todos los pares coinciden correctamente con los atributos de la excepción " +"se lanza :exc:`ResourceDenied`." #: ../Doc/library/test.rst:1299 msgid "" @@ -1294,42 +1784,60 @@ msgid "" "context manager all changes to environment variables done through this " "instance will be rolled back." msgstr "" +"Clase utilizada para establecer o deshabilitar temporalmente las variables " +"de entorno. Las instancias se pueden usar como un administrador de contexto " +"y tienen una interfaz de diccionario completa para consultar/modificar el " +"``os.environ`` subyacente. Después de salir del administrador de contexto, " +"todos los cambios en las variables de entorno realizados a través de esta " +"instancia se revertirán." #: ../Doc/library/test.rst:1305 msgid "Added dictionary interface." -msgstr "" +msgstr "Añadido una interfaz de diccionario." #: ../Doc/library/test.rst:1310 msgid "" "Temporarily set the environment variable ``envvar`` to the value of " "``value``." msgstr "" +"Se establece temporalmente la variable de entorno ``envvar`` en el valor de " +"``value``." #: ../Doc/library/test.rst:1316 msgid "Temporarily unset the environment variable ``envvar``." -msgstr "" +msgstr "Deshabilita temporalmente la variable de entorno ``envvar``." #: ../Doc/library/test.rst:1321 msgid "" "A context manager used to try to prevent crash dialog popups on tests that " "are expected to crash a subprocess." msgstr "" +"Un administrador de contexto suele intentar evitar ventanas emergentes de " +"diálogo de bloqueo en las pruebas que se espera que bloqueen un subproceso." #: ../Doc/library/test.rst:1324 msgid "" "On Windows, it disables Windows Error Reporting dialogs using `SetErrorMode " "`_." msgstr "" +"En Windows, deshabilita los cuadros de diálogo de Informe de errores de " +"Windows usando `SetErrorMode `_." #: ../Doc/library/test.rst:1327 msgid "" "On UNIX, :func:`resource.setrlimit` is used to set :attr:`resource." "RLIMIT_CORE`'s soft limit to 0 to prevent coredump file creation." msgstr "" +"En UNIX, :func:`resource.setrlimit` se usa para establecer :attr:`resource." +"RLIMIT_CORE` del límite flexible a 0 para evitar la creación de archivos " +"*coredump*." #: ../Doc/library/test.rst:1331 msgid "On both platforms, the old value is restored by :meth:`__exit__`." msgstr "" +"En ambas plataformas, el valor anterior se restaura mediante :meth:" +"`__exit__`." #: ../Doc/library/test.rst:1336 msgid "" @@ -1337,10 +1845,16 @@ msgid "" "useful for testing module-level behaviors, such as the emission of a " "DeprecationWarning on import. Example usage::" msgstr "" +"Un administrador de contexto para forzar la importación para que devuelva " +"una nueva referencia de módulo. Esto es útil para probar comportamientos a " +"nivel de módulo, como la emisión de una Advertencia de desaprobación en la " +"importación. Ejemplo de uso::" #: ../Doc/library/test.rst:1346 msgid "A context manager to temporarily add directories to sys.path." msgstr "" +"Un administrador de contexto para agregar temporalmente directorios a *sys." +"path*." #: ../Doc/library/test.rst:1348 msgid "" @@ -1348,6 +1862,9 @@ msgid "" "positional arguments, then reverts :data:`sys.path` to the copied settings " "when the context ends." msgstr "" +"Esto hace una copia de :data:`sys.path`, agrega cualquier directorio dado " +"como argumento posicional, luego revierte :data:`sys.path` a la " +"configuración copiada cuando finaliza el contexto." #: ../Doc/library/test.rst:1352 msgid "" @@ -1355,34 +1872,45 @@ msgid "" "manager, including replacement of the object, will be reverted at the end of " "the block." msgstr "" +"Tenga en cuenta que *all* :data:`sys.path` produce modificaciones en el " +"cuerpo del administrador de contexto, incluida la sustitución del objeto, se " +"revertirán al final del bloque." #: ../Doc/library/test.rst:1359 msgid "" "Class to save and restore signal handlers registered by the Python signal " "handler." msgstr "" +"Clase para guardar y restaurar manejadores (*handlers*) de señal registrados " +"por el manejador de señal Python." #: ../Doc/library/test.rst:1367 msgid "Try to match a single dict with the supplied arguments." msgstr "" +"Intenta hacer coincidir una sola sentencia con los argumentos proporcionados." #: ../Doc/library/test.rst:1372 msgid "Try to match a single stored value (*dv*) with a supplied value (*v*)." msgstr "" +"Intenta hacer coincidir un único valor almacenado (*dv*) con un valor " +"proporcionado (*v*)." #: ../Doc/library/test.rst:1377 msgid "" "Class used to record warnings for unit tests. See documentation of :func:" "`check_warnings` above for more details." msgstr "" +"La clase utilizada para registrar advertencias para pruebas unitarias. " +"Consulte la documentación de :func:`check_warnings` arriba para obtener más " +"detalles." #: ../Doc/library/test.rst:1385 msgid "Run *test* and return the result." -msgstr "" +msgstr "Retorna *test* y retorna el resultado.." #: ../Doc/library/test.rst:1390 msgid "Class for logging support." -msgstr "" +msgstr "Clase para soporte de *logging*." #: ../Doc/library/test.rst:1395 msgid "" @@ -1390,24 +1918,33 @@ msgid "" "method which just returns the *path* argument. If *path* is an exception, " "it will be raised in :meth:`!__fspath__`." msgstr "" +"Simple :term:`path-like object`. Se implementa el método :meth:`__fspath__` " +"que simplemente retorna el argumento *path*. Si *path* es una excepción, se " +"lanzará en :meth:`! __ fspath__`." #: ../Doc/library/test.rst:1401 msgid "" ":mod:`test.support.script_helper` --- Utilities for the Python execution " "tests" msgstr "" +":mod:`test.support.script_helper` ---Utilidades para las pruebas de " +"ejecución de Python" #: ../Doc/library/test.rst:1407 msgid "" "The :mod:`test.support.script_helper` module provides support for Python's " "script execution tests." msgstr "" +"El módulo :mod:`test.support.script_helper` proporciona soporte para las " +"pruebas de ejecución de script de Python." #: ../Doc/library/test.rst:1412 msgid "" "Return ``True`` if ``sys.executable interpreter`` requires environment " "variables in order to be able to run at all." msgstr "" +"Retorna `True`` si el ``sys.executable interpreter`` requiere variables de " +"entorno para poder ejecutarse." #: ../Doc/library/test.rst:1415 msgid "" @@ -1415,6 +1952,10 @@ msgid "" "that need to use an ``assert_python*()`` function to launch an isolated mode " "(``-I``) or no environment mode (``-E``) sub-interpreter process." msgstr "" +"Esto está diseñado para usarse con ``@unittest.skipIf()`` para anotar " +"pruebas que necesitan usar una función ``assert_python*()`` para iniciar un " +"modo aislado (``-I``) o sin entorno proceso de subinterpretador de modo (``-" +"E``)." #: ../Doc/library/test.rst:1419 msgid "" @@ -1422,6 +1963,10 @@ msgid "" "when trying to run the standard library test suite from an interpreter that " "doesn't have an obvious home with Python's current home finding logic." msgstr "" +"Una compilación y prueba normal no se encuentra en esta situación, pero " +"puede suceder cuando se intenta ejecutar el conjunto de pruebas de " +"biblioteca estándar desde un intérprete que no tiene un directorio principal " +"obvio con la lógica de búsqueda de directorio principal actual de Python." #: ../Doc/library/test.rst:1423 msgid "" @@ -1430,6 +1975,10 @@ msgid "" "other common environment variables that might impact whether or not the " "interpreter can start." msgstr "" +"La configuración :envvar:`PYTHONHOME` es una forma de hacer que la mayoría " +"del *testuite* se ejecute en esa situación. :envvar:`PYTHONPATH` o :envvar:" +"`PYTHONUSERSITE` son otras variables de entorno comunes que pueden afectar " +"si el intérprete puede o no comenzar." #: ../Doc/library/test.rst:1431 msgid "" @@ -1437,6 +1986,9 @@ msgid "" "subprocess. The values can include ``__isolated``, ``__cleanenv``, " "``__cwd``, and ``TERM``." msgstr "" +"Configura el entorno basado en *env_vars* para ejecutar el intérprete en un " +"subproceso. Los valores pueden incluir ``__isolated``, ``__cleanenv``, " +"``__cwd`` y ``TERM``." #: ../Doc/library/test.rst:1438 msgid "" @@ -1444,18 +1996,25 @@ msgid "" "variables *env_vars* succeeds (``rc == 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" +"Aserción de que ejecutar el intérprete con *arg* y variables de entorno " +"opcionales *env_vars* tiene éxito (``rc == 0``) y retorna una tupla " +"``(código de retorno, stdout, stderr)``." #: ../Doc/library/test.rst:1442 msgid "" "If the ``__cleanenv`` keyword is set, *env_vars* is used as a fresh " "environment." msgstr "" +"Si se establece la palabra clave ``__cleanenv``, *env_vars* se usa como un " +"entorno nuevo." #: ../Doc/library/test.rst:1445 msgid "" "Python is started in isolated mode (command line option ``-I``), except if " "the ``__isolated`` keyword is set to ``False``." msgstr "" +"Python se inicia en modo aislado (opción de línea de comando ``-I``), " +"excepto si la palabra clave ``__isolated`` se establece en ``False``." #: ../Doc/library/test.rst:1451 msgid "" @@ -1463,26 +2022,33 @@ msgid "" "variables *env_vars* fails (``rc != 0``) and return a ``(return code, " "stdout, stderr)`` tuple." msgstr "" +"Aserciona que la ejecución del intérprete con *args* y variables de entorno " +"opcionales *env_vars* falla (``rc! = 0``) y retorna una tupla ``(return " +"code, stdout, stderr)``." #: ../Doc/library/test.rst:1455 msgid "See :func:`assert_python_ok` for more options." -msgstr "" +msgstr "Consulte :func:`assert_python_ok` para más opciones." #: ../Doc/library/test.rst:1460 msgid "Run a Python subprocess with the given arguments." -msgstr "" +msgstr "Ejecuta un subproceso de Python con los argumentos dados." #: ../Doc/library/test.rst:1462 msgid "" "*kw* is extra keyword args to pass to :func:`subprocess.Popen`. Returns a :" "class:`subprocess.Popen` object." msgstr "" +"*kw* es un argumento adicional de palabras clave para pasar a :func:" +"`subprocess.Popen`. Retorna un objeto a :class:`subprocess.Popen`." #: ../Doc/library/test.rst:1468 msgid "" "Run the given :class:`subprocess.Popen` process until completion and return " "stdout." msgstr "" +"Ejecuta el proceso dado :class:`subprocess.Popen` hasta que finalice y " +"retorne *stdout*." #: ../Doc/library/test.rst:1474 msgid "" @@ -1490,6 +2056,9 @@ msgid "" "*script_basename*. If *omit_suffix* is ``False``, append ``.py`` to the " "name. Return the full script path." msgstr "" +"Crea un script que contiene *source* en la ruta *script_dir* y " +"*script_basename*. Si *omit_suffix* es ``False``, agregue ``.py`` al nombre. " +"Retorna la ruta completa del script." #: ../Doc/library/test.rst:1481 msgid "" @@ -1497,12 +2066,18 @@ msgid "" "contains the files in *script_name*. *name_in_zip* is the archive name. " "Return a tuple containing ``(full path, full path of archive name)``." msgstr "" +"Crea un archivo zip en *zip_dir* y *zip_basename* con la extensión ``zip`` " +"que contiene los archivos en *script_name*. *name_in_zip* es el nombre del " +"archivo. Retorna una tupla que contiene ``(ruta completa, ruta completa del " +"nombre del archivo)``." #: ../Doc/library/test.rst:1488 msgid "" "Create a directory named *pkg_dir* containing an ``__init__`` file with " "*init_source* as its contents." msgstr "" +"Crea un directorio llamado *pkg_dir* que contiene un archivo ``__init__`` " +"con *init_source* como su contenido." #: ../Doc/library/test.rst:1495 msgid "" @@ -1512,3 +2087,8 @@ msgid "" "be compiled and added to the zip package. Return a tuple of the full zip " "path and the archive name for the zip file." msgstr "" +"Crea un directorio de paquete zip con una ruta de *zip_dir* y *zip_basename* " +"que contiene un archivo ``__init__`` vacío y un archivo *script_basename* " +"que contiene el *source*. Si *compilado* es ``True``, ambos archivos fuente " +"se compilarán y se agregarán al paquete zip. Retorna una tupla de la ruta " +"zip completa y el nombre de archivo para el archivo zip."