kopia lustrzana https://github.com/sepandhaghighi/samila
test : tests added.
rodzic
2704be3119
commit
b9f0987348
|
@ -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')
|
||||
"""
|
||||
|
|
Ładowanie…
Reference in New Issue