Directory¶
Defines a directory entity on disk that can have a number of checks done on it.
- class Directory¶
Allows us to test for a file. We can test for existence
- property AbsPath¶
Absolute path of the file based on the default runtime behavior. This is normally the runtime path which maps to the sandbox directory.
- property AbsRunTimePath¶
Absolute path of the file based on the runtime path which maps to the sandbox directory.
- property AbsTestPath¶
Absolute path of the file based on the test path or the location in which the original test file exists.
- property Name¶
The name of the file. This is general the path to the file relative to the testing or runtime root. It can be an absolute path as well given the file was defined that way
- Getter:
returns the name
Testable properties:¶
These are the testable properties of the directory object.
- property Exists¶
Test that the Directory exists or does not exist. If set to None no test will happen
Event : Finished
Default type : Boolean
Example:
Test that a directory exists at the end of the Test run
tr = Test.AddTestRun() d = tr.Disk.Directory("logs/plugins") d.Exists = True