fix : warning_test fixed.

pull/63/head
sadrasabouri 2021-10-22 14:22:45 +03:30
rodzic 23395954ea
commit df2b3019cc
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -3,17 +3,16 @@
>>> import os
>>> from samila import *
>>> from pytest import warns
>>> with warns(RuntimeWarning, match='Neither function nor data is provided.'):
>>> with warns(RuntimeWarning, match="Neither function nor data is provided."):
... g = GenerativeImage()
>>> g = GenerativeImage(lambda x,y: 0, lambda x,y: 0)
>>> g.generate(step=0.1)
>>> g.plot()
>>> g.save_data()
>>> with warns(RuntimeWarning, match='Just data is provided you can't use generate function.'):
>>> result = g.save_data()
>>> with warns(RuntimeWarning, match="Just data is provided you can't use generate function."):
... g_ = GenerativeImage(data=open('data.json', 'r'))
>>> g_.plot()
>>> g_.data1 == g.data1
True
>>> g_.data2 == g.data2
>>> g_.fig == g.fig
True
>>> os.remove('data.json')
"""