File: test_numpy.py

package info (click to toggle)
ruamel.yaml 0.18.10%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,772 kB
  • sloc: python: 20,132; makefile: 188; sh: 31
file content (24 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# coding: utf-8

#  try:
#      import numpy
#  except:  # NOQA
#      numpy = None


#  def Xtest_numpy() -> None:
#      import ruamel.yaml
#
#      if numpy is None:
#          return
#      data = numpy.arange(10)
#      print('data', type(data), data)
#
#      buf = io.BytesIO()
#      ruamel.yaml.dump(data)  # needs updating to use buffer
#      yaml_str = buf.getvalue().decode('utf-8')
#      datb = ruamel.yaml.load(yaml_str)
#      print('datb', type(datb), datb)
#
#      print('\nYAML', yaml_str)
#      assert data == datb