test : tests added.

pull/70/head
sadrasabouri 2021-11-02 23:51:37 +03:30
rodzic 2704be3119
commit b9f0987348
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""
>>> import os
>>> import json
>>> from samila import *
>>> from pytest import warns
>>> with warns(RuntimeWarning, match="Neither function nor data is provided."):
@ -14,5 +15,9 @@
True
>>> g_.data2 == g.data2
True
>>> with open('data.json', 'w') as fp:
... json.dump({'data1': [0], 'data2': [0], 'matplotlib_version': '0'}, fp)
>>> with warns(RuntimeWarning, match="Source matplotlib version is different from yours, plots may be different."):
... g = GenerativeImage(lambda x,y: 0, lambda x,y: 0, data=open('data.json', 'r'))
>>> os.remove('data.json')
"""