Skip to content

Commit

Permalink
save file and give path
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Nov 4, 2024
1 parent 4a0c701 commit 186cf0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions solarmach/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,23 @@ def test_solarmach_pfss():
markers='numbers', long_sector=[290, 328], long_sector_vsw=[400, 600],
long_sector_color='red', reference_vsw=400.0, outfile='solarmach_pfss.png')

# plotfile = #os.getcwd()+os.sep+'solarmach_pfss.png'
plotfile = os.getcwd()+os.sep+'solarmach_pfss.png'
print(plotfile)

import base64
with open('solarmach_pfss.png', 'rb') as image_file:
base64_bytes = base64.b64encode(image_file.read())
print(base64_bytes)

base64_string = base64_bytes.decode()
print(base64_string)
# print(base64_string)
file1 = open('solarmach_pfss.txt', 'w')
file1.write(base64_string)
file1.close()




assert isinstance(fig, matplotlib.figure.Figure)
return fig
assert hashlib.sha1(pd.util.hash_pandas_object(sm.coord_table).values).hexdigest() == '0709d8b384c5b74b792ce725c4165a2741f88e3f'
Expand Down

0 comments on commit 186cf0d

Please sign in to comment.