• Tjerk Vreeken's avatar
    Fix DeprecationWarnings in tests · e82b3069
    Tjerk Vreeken authored
    The assertRaisesRegexp name was deprecated in Python 3.2 in favor of
    assertRaisesRegex. Our minimum version requirement is Python 3.5, so
    this change is fully backwards compatible for our purposes.
    
    The np.all() check would raise a DeprecationWarning if the lengths of
    the two arrays were not equal. The required additional length check
    means the early termination moves inside the if-else for __iter__ (i.e.
    is "t" an np.ndarray or a float). Note that we can skip the length check
    when "t" is a float, making the early termination a little more
    generic (also working when len(ts) > 1).
    e82b3069
Name
Last commit
Last update
..
data Loading commit data...
optimization Loading commit data...
simulation Loading commit data...
data_path.py Loading commit data...
test_case.py Loading commit data...