diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:19:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:19:53 +0000 |
commit | e7ee850d46d54789979bf0c5244bae1825fb7149 (patch) | |
tree | 6e94ed55df9ec749682a3c792ce752d07892b968 /_test/test_numpy.py | |
parent | Initial commit. (diff) | |
download | python-ruyaml-e7ee850d46d54789979bf0c5244bae1825fb7149.tar.xz python-ruyaml-e7ee850d46d54789979bf0c5244bae1825fb7149.zip |
Adding upstream version 0.91.0.upstream/0.91.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '_test/test_numpy.py')
-rw-r--r-- | _test/test_numpy.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/_test/test_numpy.py b/_test/test_numpy.py new file mode 100644 index 0000000..4590625 --- /dev/null +++ b/_test/test_numpy.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +try: + import numpy +except: # NOQA + numpy = None + + +def Xtest_numpy(): + import ruyaml + + if numpy is None: + return + data = numpy.arange(10) + print('data', type(data), data) + + yaml_str = ruyaml.dump(data) + datb = ruyaml.load(yaml_str) + print('datb', type(datb), datb) + + print('\nYAML', yaml_str) + assert data == datb |