Home
last modified time | relevance | path

Searched +full:module +full:- +full:path +full:- +full:tests (Results 1 – 25 of 1052) sorted by relevance

12345678910>>...43

/external/python/cpython3/Lib/unittest/test/
Dtest_discovery.py1 import os.path
2 from os.path import abspath
17 module = None variable in TestableTestProgram
30 # Heavily mocked tests so I can avoid hitting the filesystem
50 original_isfile = os.path.isfile
52 os.path.isfile = original_isfile
53 original_isdir = os.path.isdir
55 os.path.isdir = original_isdir
58 'test.foo', 'test-not-a-module.py', 'another_dir'],
60 os.listdir = lambda path: path_lists.pop(0)
[all …]
/external/python/cpython2/Lib/unittest/test/
Dtest_discovery.py11 # Heavily mocked tests so I can avoid hitting the filesystem
32 original_isfile = os.path.isfile
34 os.path.isfile = original_isfile
35 original_isdir = os.path.isdir
37 os.path.isdir = original_isdir
40 'test.foo', 'test-not-a-module.py', 'another_dir'],
42 os.listdir = lambda path: path_lists.pop(0)
45 def isdir(path): argument
46 return path.endswith('dir')
47 os.path.isdir = isdir
[all …]
/external/python/cpython2/Lib/unittest/
Dloader.py17 # we would need to avoid loading the same tests multiple times
19 VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE)
23 message = 'Failed to import test module: %s\n%s' % (name, traceback.format_exc())
40 This class is responsible for loading tests according to various criteria
59 def loadTestsFromModule(self, module, use_load_tests=True): argument
60 """Return a suite of all test cases contained in the given module"""
61 tests = []
62 for name in dir(module):
63 obj = getattr(module, name)
65 tests.append(self.loadTestsFromTestCase(obj))
[all …]
/external/python/cpython3/Lib/unittest/
Dloader.py18 # we would need to avoid loading the same tests multiple times
20 VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE)
39 message = 'Failed to import test module: %s\n%s' % (
60 def _jython_aware_splitext(path): argument
61 if path.lower().endswith('$py.class'):
62 return path[:-9]
63 return os.path.splitext(path)[0]
68 This class is responsible for loading tests according to various criteria
81 # avoid infinite re-entrancy.
98 def loadTestsFromModule(self, module, *args, pattern=None, **kws): argument
[all …]
Dmain.py15 %(prog)s test_module - run tests from test_module
16 %(prog)s module.TestClass - run tests from module.TestClass
17 %(prog)s module.Class.test_method - run specified test method
18 %(prog)s path/to/test_file.py - run tests from test_file.py
23 %(prog)s - run default set of tests
24 %(prog)s MyTestSuite - run suite 'MyTestSuite'
25 %(prog)s MyTestCase.testSomething - run MyTestCase.testSomething
26 %(prog)s MyTestCase - run all 'test*' test methods
34 # valid Python module name.
35 if os.path.isfile(name) and name.lower().endswith('.py'):
[all …]
/external/hamcrest/
Dbuild.xml.original4 …<property name="haltonfailure" value="true" description="Whether to halt the build if the tests fa…
7 … <tstamp><format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss" timezone="GMT"/></tstamp>
8 …ache.tools.ant.taskdefs.optional.junit.JUnitTask" classpath="lib/integration/ant-junit-1.8.4.jar"/>
11 … depends="clean, bigjar, javadoc" description="Performs clean build, runs tests and packages for d…
18 <path id="cp-hamcrest-api-main" path=""/>
19 <path id="cp-hamcrest-api-test" path=""/>
20 <compile-module modulename="hamcrest-api"/>
21 <jar-module modulename="hamcrest-api"/>
22 <test-module modulename="hamcrest-api"/>
26 …<path id="cp-hamcrest-generator-main" path="lib/generator/qdox-2.0-M2.jar;build/hamcrest-api-${ver…
[all …]
/external/libchrome/mojo/public/tools/bindings/pylib/mojom_tests/generate/
Ddata_unittest.py2 # Use of this source code is governed by a BSD-style license that can be
6 import os.path
13 path = os.path.abspath(__file__)
15 path, tail = os.path.split(path)
18 return path
23 sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
25 from mojom.generate import module as mojom
31 """Tests that a struct can be converted from data."""
32 module = mojom.Module('test_module', 'test_namespace')
42 struct = data.StructFromData(module, struct_data)
[all …]
Dmodule_unittest.py2 # Use of this source code is governed by a BSD-style license that can be
6 import os.path
13 path = os.path.abspath(__file__)
15 path, tail = os.path.split(path)
18 return path
23 sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
24 from mojom.generate import module as mojom
30 """Tests that a non-interface cannot be used for interface requests."""
31 module = mojom.Module('test_module', 'test_namespace')
32 struct = mojom.Struct('TestStruct', module=module)
[all …]
/external/python/cpython3/Doc/library/
Dtest.rst1 :mod:`test` --- Regression tests package for Python
4 .. module:: test
5 :synopsis: Regression tests package containing the testing suite for Python.
16 --------------
18 The :mod:`test` package contains all regression tests for Python as well as the
20 :mod:`test.support` is used to enhance your tests while
23 Each module in the :mod:`test` package whose name starts with ``test_`` is a
24 testing suite for a specific module or feature. All new tests should be written
25 using the :mod:`unittest` or :mod:`doctest` module. Some older tests are
32 Module :mod:`unittest`
[all …]
/external/aws-sdk-java-v2/scripts/
Drun-integ-test2 """Run Integ Tests based on the changed files
7 # Minimal modules to tests when core changes are detected.
8 # s3 - xml, dynamodb - json, sqs - query
11 # Minimal modules to tests when http client changes are detected.
12 # s3 - streaming/non streaming, kinesis - h2
14 "apache-client": ["s3", "apache-client"],
15 "netty-nio-client": ["kinesis", "s3", "netty-nio-client"],
16 "url-connection-client": ["url-connection-client"]
23 process = Popen(["git", "diff", "HEAD^", "--name-only"], stdout=PIPE)
33 Parse the changed file path and get the respective module names
[all …]
/external/tensorflow/tensorflow/python/tpu/
Dtpu_test_wrapper.py7 # http://www.apache.org/licenses/LICENSE-2.0
15 """Wrapper for Python TPU tests.
18 executing the user-provided test file as a py_binary instead. This lets us do
19 important work behind the scenes, without complicating the tests themselves.
22 - Define standard set of model flags if test did not. This allows us to
23 safely set flags at the Bazel invocation level using --test_arg.
24 - Pick a random directory on GCS to use for each test case, and set it as the
25 default value of --model_dir. This is similar to how Bazel provides each
41 'The Python-style relative path to the user-given test. If test is in same '
45 'GCS path to root directory for temporary test files.')
[all …]
/external/python/pyfakefs/pyfakefs/tests/
Dfake_filesystem_unittest_test.py2 # Copyright 2015-2017 John McGehee
9 # http://www.apache.org/licenses/LICENSE-2.0
31 from pathlib import Path
34 import pyfakefs.tests.import_as_example
35 import pyfakefs.tests.logsio
44 from pyfakefs.tests.fixtures import module_with_attributes
100 self.assertFalse(os.path.exists("/fake_file.txt"))
112 """Fake io module is bound"""
113 self.assertFalse(os.path.exists("/fake_file.txt"))
125 """Fake os module is bound"""
[all …]
/external/python/pyfakefs/docs/
Dautopatch.rst5 The ``fake_filesystem_unittest`` module automatically finds all real file
9 - ``example.py`` is the software under test. In production, it uses the
11 - ``example_test.py`` tests ``example.py``. During testing, the pyfakefs fake
14 .. note:: This example uses the Python ``unittest`` module for testing, but the
20 -------------------
25 def create_file(path):
32 >>> os.path.isdir('/test')
35 >>> os.path.isdir('/test')
37 >>> os.path.exists('/test/file.txt')
40 >>> os.path.exists('/test/file.txt')
[all …]
/external/aws-sdk-java-v2/test/module-path-tests/
Dpom.xml1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
15 -->
18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 …xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21 <artifactId>aws-sdk-java-pom</artifactId>
28 <artifactId>module-path-tests</artifactId>
30 <name>AWS Java SDK :: Test :: Module Path Tests</name>
31 <description>A set of tests to run v2 in module path with Java 9+.</description>
38 <artifactId>bom-internal</artifactId>
[all …]
/external/pigweed/pw_unit_test/
Ddocs.rst1 .. _module-pw_unit_test:
6 .. pigweed-module::
9 .. tab-set::
11 .. tab-item:: mylib_test.cpp
13 .. code-block:: c++
29 .. tab-item:: BUILD.bazel
31 .. code-block:: python
52 .. tab-item:: mylib.cc
54 .. code-block:: c++
69 .. tab-item:: mylib.h
[all …]
/external/python/cpython3/Lib/test/
Dtest_zipimport_support.py1 # This test module covers support in various parts of the standard library
3 # The tests are centralised in this fashion to make it easy to drop them
7 import os.path
27 # Other test modules with zipimport related tests
36 def _run_object_doctest(obj, module): argument
40 # Otherwise, use the module's name
44 name = module.__name__
45 for example in finder.find(obj, name, module):
51 print ('doctest (%s) ... %d tests with zero failures' % (module.__name__, t))
59 # in the sys module after each test. However, that restores
[all …]
/external/cronet/base/
Dbase_paths.h2 // Use of this source code is governed by a BSD-style license that can be
8 // This file declares path keys for the base module. These can be used with
33 FILE_EXE, // Path and filename of the current executable.
36 // module location may not work as expected on some platforms. For this
39 FILE_MODULE, // Path and filename of the module containing the code for
47 // module location may not work as expected on some platforms. For this
66 // The following are only for use in tests.
67 // On some platforms, such as Android and Fuchsia, tests do not have access to
69 // binary. On such platforms, these will return an appropriate path inside the
72 // made available to tests. Useful for tests that use
[all …]
/external/autotest/utils/
Dunittest_suite.py1 #!/usr/bin/python3 -u
11 parser.add_option("-r", action="store", type="string", dest="start",
14 parser.add_option("--full", action="store_true", dest="full", default=False,
16 parser.add_option("--debug", action="store_true", dest="debug", default=False,
18 parser.add_option("--skip-tests", dest="skip_tests", default=[],
19 help="A space separated list of tests to skip")
24 # tests and do not need to be executed in unittest suite for various reasons.
25 # Each entry can be file name or relative path that's relative to the parent
28 # path. If a file's name is too general and has a chance to collide with files
29 # in other folder, it is recommended to specify its relative path here, e.g.,
[all …]
/external/grpc-grpc/src/python/grpcio_tests/tests/
D_loader.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 # Determines the path og a given path relative to the first matching
33 # path on sys.path. Useful for determining what a directory's module
34 # path will be.
35 def _relativize_to_sys_path(path): argument
36 for sys_path in sys.path:
37 if path.startswith(sys_path):
38 relative = path[len(sys_path) :]
41 if relative.startswith(os.path.sep):
42 relative = relative[len(os.path.sep) :]
[all …]
/external/python/asn1crypto/tests/
D__init__.py1 # coding: utf-8
13 def _import_from(mod, path, mod_dir=None): argument
15 Imports a module from a specific path
18 A unicode string of the module name
20 :param path:
21 A unicode string to the directory containing the module
24 If the sub directory of "path" is different than the "mod" name,
28 None if not loaded, otherwise the module
34 if not os.path.exists(path):
37 if not os.path.exists(os.path.join(path, mod_dir)):
[all …]
/external/python/cpython3/Lib/test/test_importlib/
Dtest_util.py25 source_bytes = self.source.encode('utf-8')
29 source = '# coding=latin-1\n' + self.source
30 source_bytes = source.encode('latin-1')
31 assert source_bytes != source.encode('utf-8')
36 source_bytes = source.encode('utf-8')
50 def exec_module(self, module): argument
54 module = self.util.module_from_spec(spec)
61 module = self.util.module_from_spec(spec)
62 self.assertIsInstance(module, types.ModuleType)
63 self.assertEqual(module.__name__, spec.name)
[all …]
/external/autotest/server/cros/tradefed/
Dtradefed_utils.py3 # Use of this source code is governed by a BSD-style license that can be
28 # our needs. See /usr/lib64/python2.7/site-packages/lockfile/
35 # Cap the wait by 2 minutes. Setting too long wait makes long-lived
50 # the lock for following tests. If the failure affects more than
84 @param extra_paths: any additional components to the PATH environment
87 from autotest_lib.client.common_lib.cros import adb_keepalive as module unknown
88 # |__file__| returns the absolute path of the compiled bytecode of the
89 # module. We want to run the original .py file, so we need to change the
91 script_filename = module.__file__.replace('.pyc', '.py')
111 @param waivers: a set() of tests which are permitted to fail.
[all …]
/external/python/cpython2/Lib/
Ddoctest.py1 # Module doctest.
2 # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
7 # Provided as-is; use at your own risk; no warranty; no promises; enjoy!
9 r"""Module doctest -- a framework for running examples in docstrings.
11 In simplest use, end each module M to be tested with:
20 Then running the module as a script will cause the examples in the
30 Run it with the -v switch instead:
32 python M.py -v
42 with the unittest framework, and support for running non-Python text
107 # - Example: a <source, want> pair, plus an intra-docstring line number.
[all …]
/external/python/mobly/mobly/
Dtest_runner.py7 # http://www.apache.org/licenses/LICENSE-2.0
36 """Execute the test class in a test module.
43 .. code-block:: python
66 tests = None
67 if args.tests:
68 tests = args.tests
77 runner.add_test_class(config, test_class, tests)
109 '-c',
110 '--config',
112 metavar='<PATH>',
[all …]
/external/python/cpython3/Lib/
Ddoctest.py1 # Module doctest.
2 # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
7 # Provided as-is; use at your own risk; no warranty; no promises; enjoy!
9 r"""Module doctest -- a framework for running examples in docstrings.
11 In simplest use, end each module M to be tested with:
20 Then running the module as a script will cause the examples in the
30 Run it with the -v switch instead:
32 python M.py -v
42 with the unittest framework, and support for running non-Python text
111 # - Example: a <source, want> pair, plus an intra-docstring line number.
[all …]

12345678910>>...43