test_fake.py 378 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import pytest

from treetensor import TreeNumpy

try:
    import numpy as np
except ImportError:
    need_fake = True
    from treetensor.numpy.fake import FakeTreeNumpy
else:
    need_fake = False

unittest_mark = pytest.mark.unittest if need_fake else pytest.mark.ignore


@unittest_mark
class TestNumpyFake:
    def test_base(self):
        assert TreeNumpy is FakeTreeNumpy