Ticket #7057 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Move Python unit tests that use files to use workspaces

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 2.6
Component: Python Keywords: Maintenance
Cc: Blocked By:
Blocking: Tester: Gesner Passos

Description


Change History

comment:1 Changed 7 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Martyn Gigg

Define a testhelpers Python package that sits on C++ one.

Refs #7057

Changeset: b1af2c42ed8cd90825e37dc33aedbf5e006adf37

comment:3 Changed 7 years ago by Martyn Gigg

Define a macro to check that Python unit tests will actaully run.

If they do not end with uniitest.main() then they will not be executed. It is now a cmake error if they do not. Refs #7057

Changeset: 7ebc409fcd1c28095e42257f1b301c5342e4e4b8

comment:4 Changed 7 years ago by Martyn Gigg

Use new macro and fix tests that were not being executed. Refs #7057

Changeset: 820c2f570209c77fe2c569d8a4f97bec43f39064

comment:5 Changed 7 years ago by Martyn Gigg

Define a testhelpers Python package that sits on C++ one.

Refs #7057

Changeset: 3081deafb64791c530a97920c0168e7ab630f0c0

comment:6 Changed 7 years ago by Martyn Gigg

Define a macro to check that Python unit tests will actaully run.

If they do not end with uniitest.main() then they will not be executed. It is now a cmake error if they do not. Refs #7057

Changeset: 1550d6585fcfb0b1c746d7330f8354961181dad9

comment:7 Changed 7 years ago by Martyn Gigg

Use new macro and fix tests that were not being executed. Refs #7057

Changeset: 3bc7f1d250b0adea922e110281023503762e618a

comment:8 Changed 7 years ago by Martyn Gigg

Add CreateEventWorkspace helpers to WorkspaceCreationHelper mod.

Refs #7057

Changeset: fdadf5957ef01d8e1190add3a04f94b8d758ecff

comment:9 Changed 7 years ago by Martyn Gigg

Use workspace helpers instead of files for peaks & event workspaces.

Refs #7057

Changeset: c989be5a2384881329948fdd12627a3a4c2307da

comment:10 Changed 7 years ago by Martyn Gigg

Export add methods on ADS to Python. Refs #7057

Changeset: 5eb2beac7aaf055b4993229393f95b66a9797615

comment:11 Changed 7 years ago by Martyn Gigg

Replace more file loading with in-memory workspaces. Refs #7057

Changeset: 04bd35b016e5c23fe05b7ba413d4360fdbe974aa

comment:12 Changed 7 years ago by Martyn Gigg

Include MDEventsTestHelpers inside Python testhelpers package.

Refs #7057

Changeset: 6904587e4fed8535cda2d8b5811152c47a4b5e01

comment:13 Changed 7 years ago by Martyn Gigg

Export DateAndTime constructors to Python. Refs #7057

Changeset: 68cb9c2b3fb4965510e01ae60c2e13fb8fbcafd1

comment:14 Changed 7 years ago by Martyn Gigg

Replace file usage in RunTest.py

It uses the new DateAndTime constructors to simulate the load. Refs #7057

Changeset: bf4430f57d6b1ebae7befe1458795848c8d0f22f

comment:15 Changed 7 years ago by Martyn Gigg

Remove file from TimeSeriesProperty test. Refs #7057

Changeset: 71b50c75cbb3cc3e65c220b6f1da00aa209e1dc1

comment:16 Changed 7 years ago by Martyn Gigg

Remove more files from Python tests. Refs #7057

Changeset: ccb68b791858bbc4acf6fac1082eeabf72bcf3dd

comment:17 Changed 7 years ago by Martyn Gigg

Replace files in simpleapi tests (where possible). Refs #7057

The SimpleAPILoad has to load files to check Load is doing its job properly so they cannot be removed.

Changeset: 9eaec499bd66df5fbc446445218088f38c75a62f

comment:18 Changed 7 years ago by Martyn Gigg

Remove use of file in CreateWorkspaceTest. Refs #7057

The remaining algorithm tests require file loading so will not be touched.

Changeset: e8ec87e3a8b05150a7dfcd2479601034219e7f60

comment:19 Changed 7 years ago by Martyn Gigg

Link DataObjects & MDEvents to testhelpers WorkspaceCreationHelper

Refs #7057

Changeset: 59c2aebde0c90b874f6739b1ad23a6da06b62c46

comment:20 Changed 7 years ago by Martyn Gigg

Forgot DataHandling link. Refs #7057

Changeset: f4fb187410ccba199f00b68733e6189da145de59

comment:21 Changed 7 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

Branch: feature/7057_py_unittests_rm_files

Tester: This only covers the PythonInterface module.

As a minimum all of the Python unit tests should be passing. You should then check that the only unit tests in PythonInterface that use files either:

  • Do not actually execute the algorithm that uses the file or
  • Require a file for the test e.g. Load tests.

comment:22 Changed 7 years ago by Martyn Gigg

Fix name of dlopen module on Linux. Refs #7057

Changeset: 61372b505dc707abcacc01df0d4d07da225d3d94

comment:23 Changed 7 years ago by Owen Arnold

Merge branch 'feature/7108_conjoin_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:24 Changed 7 years ago by Vickie Lynch

Merge branch 'feature/6469_LoadForPeaksFiles' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:25 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:26 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:27 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:28 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:29 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:30 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:31 Changed 7 years ago by Owen Arnold

Merge branch 'feature/7108_conjoin_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:32 Changed 7 years ago by Vickie Lynch

Merge branch 'feature/6469_LoadForPeaksFiles' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:33 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:34 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:35 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:36 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:37 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:38 Changed 7 years ago by Martyn Gigg

Merge branch 'feature/7057_py_unittests_rm_files' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:39 Changed 7 years ago by Gesner Passos

  • Status changed from verify to verifying
  • Tester set to Gesner Passos

comment:40 Changed 7 years ago by Gesner Passos

Merge remote-tracking branch 'origin/feature/7057_py_unittests_rm_files' into master

comment:41 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to closed

It drastically reduced Load from python unit tests. Now, i think it would be nice to point to developers how to use the helper in order to test the functionality of their algorithms, or modules.

For example, what is the meaning of createUnmanaged? Or what are the characteristics of the workspaces created by the WorkspaceCreationHelper? How we should use? Best practices?

comment:42 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:43 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Python API

comment:44 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7903

Note: See TracTickets for help on using tickets.