before¶
- typhoon.test.ranges.before(t)¶
Defines time range from earliest possible up to t. This function is used to have more readable code on automated tests.
- Parameters:
t (float or Timedelta) – Time up to this value will be contained in the range.
- Returns:
Range as a tuple (-inf, t)
- Return type:
tuple
Notes
The earlest time considered (-inf) is defined as td.min (minimum allowed timedelta value in python), that, when used in analysis functions, will default to maximum time point available in the timeseries analyzed.
Examples
Pure numbers are interpreted as seconds.
>>> at_t=before(1)
Using a string with units:
>>> at_t=before('1ms')
See also