kopia lustrzana https://github.com/sepandhaghighi/samila
fix : warning_test fixed.
rodzic
23395954ea
commit
df2b3019cc
|
@ -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')
|
||||
"""
|
||||
|
|
Ładowanie…
Reference in New Issue