-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2023 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
import os
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
featureToExport = Point_2
model.exportPart(partSet, filename, [featureToExport.result()])
model.end()
assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+
+model.removeTmpFile(filename)