--- /dev/null
+# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ============================================================ #
+# #
+# Attention: Keep this file for correct execution on Windows #
+# #
+# ============================================================ #
# Check exported file
aRefPath = os.path.join(os.getenv("DATA_DIR"), "Shapes", "Xao", "box2.xao")
- import filecmp
- assert filecmp.cmp(theFile, aRefPath)
+ # endlines may be different on different platforms, thus compare files line-by-line
+ areFilesEqual = True
+ with open(theFile, 'r') as file, open(aRefPath, 'r') as ref:
+ l1 = l2 = True
+ while l1 and l2 and areFilesEqual:
+ l1 = file.readline()
+ l2 = ref.readline()
+ areFilesEqual = l1 == l2
+ assert areFilesEqual
if __name__ == '__main__':
with TemporaryDirectory() as tmp_dir: