Commit Graph

6 Commits

Author SHA1 Message Date
Campbell Barton
7ef925752c Tests: remove support.run_unittest 2014-08-21 19:56:21 +10:00
Bastien Montagne
8535b9bd15 Fix T38722: Adding units in Imperial setting results in inconsistent values
Now always check for a default unit, and evaluate the whole expression in this "unit space".
Not an ideal solution, but should handle most cases nicely
(we can't address all possible corner cases anyway).

Note default unit is searched in current string first (bigger unit of current system wins),
then in previous string.

Note this also replaces ',' by '+' in default separation between units,
helps solving issues with parenthesis (e.g. (1'1")*2.5 would fail in existing code)!
This would break if someone uses py ops with lower precedence than '+' (like bitwise
operations, and comparison), but these are not expected usecase here anyway.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D340
2014-08-20 12:12:03 +02:00
Campbell Barton
1528e5c20a Run unittest.main() directly 2014-08-11 15:23:00 +10:00
Campbell Barton
200dd87de1 Cleanup: pep8 & redundant vars 2014-07-22 12:03:15 +10:00
Campbell Barton
7ecc3f4734 Add brief license headers to tests
These are effectively public-domain, but use apache2.0 to avoid adding new licenses
2014-06-19 18:48:41 +10:00
Campbell Barton
0eb060c7b4 Move tests into tests/ top-level dir 2014-06-18 22:03:46 +10:00