File: test_mps_ops.py

package info (click to toggle)
python-thinc 9.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,896 kB
  • sloc: python: 17,122; javascript: 1,559; ansic: 342; makefile: 15; sh: 13
file content (11 lines) | stat: -rw-r--r-- 386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from thinc.api import NumpyOps, get_ops
from thinc.compat import has_apple_ops


def test_mps_ops_inherits_apple_ops():
    ops = get_ops("mps")
    assert isinstance(ops, NumpyOps)
    if has_apple_ops:
        # We can't import AppleOps directly, because its' not
        # available on non-Darwin systems.
        assert "AppleOps" in [base.__name__ for base in type(ops).__bases__]