Skip to content

Commit 3955c37

Browse files
authored
Tests for variables with units (#3654)
* add tests for variable by inheriting from VariableSubclassobjects * make sure the utility functions work with variables * add additional tests for aggregation and numpy methods * don't assume variables have a name attribute * properly merge the used arguments * properly attach to non-xarray objects * add a test function for searchsorted and item * add tests for missing value detection methods * add tests for comparisons * don't try to check missing value behaviour for int arrays * xfail the compatible unit tests * use an additional check since identical is not sufficient right now * check for compatibility by comparing the dimensionality of units * add tests for fillna * add tests for isel * add tests for 1d math * add tests for broadcast_equals * add tests for masking * add tests for squeeze * add tests for coarsen, quantile, roll, round and shift * add tests for searchsorted * add tests for rolling_window * add tests for transpose * add tests for stack and unstack * add tests for set_dims * add tests for concat, copy and no_conflicts * add tests for reduce * add tests for pad_with_fill_value * all and any have been implemented by pint * remove a unnecessary call to np.array * mark the unrelated failures as xfail * remove a debug print * document the need for force_ndarray * make is_compatible a little bit more robust * clean up is_compatible * add docstrings explaining the use of the method and function classes * put the unit comparisons into a function * actually squeeze the dimensions separately
1 parent f8386be commit 3955c37

File tree

1 file changed

+844
-10
lines changed

1 file changed

+844
-10
lines changed

0 commit comments

Comments
 (0)