Skip to content

Commit

Permalink
Re #10234. Removed unecessary check of whether output file exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
yxqd committed Sep 3, 2015
1 parent 6f33c23 commit 07ef1b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ def PyExec(self):
raise ValueError(
"InputWorkspace must be one-dimensional.")

if os.path.exists(outfilename):
raise IOError(
"Output file %s already exists" % outfilename)

# Generate Json file
self._save(inputws, outfilename, plotname)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def test_save_one_histogram(self):
np.testing.assert_array_equal(d0['x'], E)
np.testing.assert_array_equal(d0['y'], I)
np.testing.assert_array_equal(d0['e'], err)
# test overwrite
alg_test = run_algorithm(
"SavePlot1DAsJson",
InputWorkspace = datawsname,
JsonFilename = out_path)
# Delete the output file
os.remove(out_path)
return
Expand Down

0 comments on commit 07ef1b9

Please sign in to comment.