dmlc--dgl
f282ee30ad
* Add unit test * Fix typo Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
12 行
317 B
Python
12 行
317 B
Python
import backend as F
|
|
import os
|
|
import unittest
|
|
|
|
|
|
def test_set_default_backend():
|
|
default_dir = os.path.join(os.path.expanduser('~'), '.dgl_unit_test')
|
|
F.set_default_backend(default_dir, 'pytorch')
|
|
|
|
# make sure the config file was created
|
|
assert os.path.exists(os.path.join(default_dir, 'config.json'))
|