diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-19 13:26:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-19 13:27:38 +0300 |
commit | 92899421cca252229101e1d9506f5e83ad66d149 (patch) | |
tree | 7e5e723dda30c62ad9bf09f6bcf77f8a54a79303 | |
parent | 7842e731998cc3cc9872e8d62a8a8a2577bd3982 (diff) |
Fix svg_util_test not working anymore from direct manual execution.
Annoying hack, but cannot think of any better solution for now.
-rwxr-xr-x | io_curve_svg/svg_util_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/io_curve_svg/svg_util_test.py b/io_curve_svg/svg_util_test.py index 340a6088..68f3a8b0 100755 --- a/io_curve_svg/svg_util_test.py +++ b/io_curve_svg/svg_util_test.py @@ -20,7 +20,13 @@ # <pep8 compliant> -from .svg_util import parse_array_of_floats + +# XXX Not really nice, but that hack is needed to allow execution of that test +# from both automated CTest and by directly running the file manually... +if __name__ == '__main__': + from svg_util import parse_array_of_floats +else: + from .svg_util import parse_array_of_floats import unittest |