DepsetFileSubject¶
DepsetFileSubject.new¶
DepsetFileSubject.new(files, meta, container_name=”depset”, element_plural_name=”files”)
Creates a DepsetFileSubject asserting on files
.
Method: DepsetFileSubject.new
PARAMETERS ¶
- files¶:
- meta¶:
(
ExpectMeta
) of call chain information.- container_name¶:
(default
"depset"
) (str
) conceptual name of the container.- element_plural_name¶:
(default
"files"
) (str
) the plural word for the values in the container.
- RETURNS ¶
DepsetFileSubject
object.
DepsetFileSubject.contains¶
DepsetFileSubject.contains(expected)
Asserts that the depset of files contains the provided path/file.
Method: DepsetFileSubject.contains
PARAMETERS ¶
DepsetFileSubject.contains_at_least¶
DepsetFileSubject.contains_at_least(expected)
Asserts that the depset of files contains at least the provided paths.
Method: DepsetFileSubject.contains_at_least
PARAMETERS ¶
- expected¶:
([
collection
] ofstr
| collection ofFile
) multiplicity is respected. If string paths are provided, they are compared to the short path of the files and are formatted usingExpectMeta.format_str
and its current contextual keywords. Note that, when usingFile
objects, two files’ configurations must be the same for them to be considered equal.
DepsetFileSubject.contains_any_in¶
DepsetFileSubject.contains_any_in(expected)
Asserts that any of the values in expected
exist.
Method: DepsetFileSubject.contains_any_in
PARAMETERS ¶
DepsetFileSubject.contains_at_least_predicates¶
DepsetFileSubject.contains_at_least_predicates(matchers)
Assert that the depset is a subset of the given predicates.
Method: DepsetFileSubject.contains_at_least_predicates
The depset must match all the predicates. It can contain extra elements.
The multiplicity of matchers is respected. Checking that the relative order
of matches is the same as the passed-in matchers order can done by calling
in_order()
.
PARAMETERS ¶
DepsetFileSubject.contains_predicate¶
DepsetFileSubject.contains_predicate(matcher)
Asserts that matcher
matches at least one value.
Method: DepsetFileSubject.contains_predicate
PARAMETERS ¶
- matcher¶:
[
Matcher
] (seematching
struct) that acceptsFile
objects.
DepsetFileSubject.contains_exactly¶
DepsetFileSubject.contains_exactly(paths)
Asserts the depset of files contains exactly the given paths.
Method: DepsetFileSubject.contains_exactly
PARAMETERS ¶
DepsetFileSubject.not_contains¶
DepsetFileSubject.not_contains(short_path)
Asserts that short_path
is not in the depset.
Method: DepsetFileSubject.not_contains_predicate
PARAMETERS ¶
DepsetFileSubject.not_contains_predicate¶
DepsetFileSubject.not_contains_predicate(matcher)
Asserts that nothing in the depset matches matcher
.
Method: DepsetFileSubject.not_contains_predicate
PARAMETERS ¶