DepsetFileSubject¶
DepsetFileSubject.contains¶
DepsetFileSubject.contains(expected)
Asserts that the depset of files contains the provided path/file.
Method: DepsetFileSubject.contains
PARAMETERS ¶
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¶
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_strand its current contextual keywords. Note that, when usingFileobjects, two files’ configurations must be the same for them to be considered equal.
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_exactly¶
DepsetFileSubject.contains_exactly(paths)
Asserts the depset of files contains exactly the given paths.
Method: DepsetFileSubject.contains_exactly
PARAMETERS ¶
DepsetFileSubject.contains_none_of¶
DepsetFileSubject.contains_none_of(values)
Asserts that the depset of files contains none of the provided paths.
Method: DepsetFileSubject.contains_none_of
PARAMETERS ¶
- values¶:
([‘collection’] of [‘str’] | collection of [‘File’]. If string paths are provided then they are compared to the short path of the files and are formatted using ‘ExpectMeta.format_str’ and its current contextual keywords. Note that, when using
Fileobjects, two files’ configurations must be the same for them to be considered equal.
DepsetFileSubject.contains_predicate¶
DepsetFileSubject.contains_predicate(matcher)
Asserts that matcher matches at least one value.
Method: DepsetFileSubject.contains_predicate
PARAMETERS ¶
- matcher¶:
[
Matcher] (seematchingstruct) that acceptsFileobjects.
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 ¶
DepsetFileSubjectobject.
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 ¶