20 Commits

Author SHA1 Message Date
Matthias Kuhn
eb7a235dc1 Print messages from QgsMessageLog to the console when testing 2017-01-19 14:41:04 +01:00
Nyall Dawson
1bdb35d630 Avoid key error on fields which should be skipped 2016-12-07 20:13:29 +10:00
Denis Rouzaud
a373f95707 [FEATURE] add functionnality to copy/move feature to move feature map tool 2016-11-15 11:28:47 +01:00
Nyall Dawson
143c18da6f Fix processing tests weren't actually comparing resultant features
.... oops (my fault - copy/paste error)
2016-11-07 09:23:35 +10:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Nyall Dawson
f449bf2361 Make test layer comparison handle different order of features 2016-08-02 11:53:11 +10:00
Nyall Dawson
bd7d913379 Refine QgsFeature geometry getters/setters
All pointer based methods have been removed.

Now we have only:

  void setGeometry( const QgsGeometry& geom )

and

  QgsGeometry geometry() const

Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...

Impacts on PyQGIS code:
- no more need for the messy
  g = QgsGeometry( feature.geometry() )
  workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
 using `if f.geometry():`, since QgsFeature::geometry() will
 *always* return an object. Instead, use
 `if not f.geometry().isEmpty():`, or preferably the new method
 `if not f.hasGeometry():`

Fix #777
2016-08-01 16:25:46 +10:00
Matthias Kuhn
c1687abc80 Replace calls to deprecated assertEquals method 2016-05-03 09:18:27 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Denis Rouzaud
ba94896015 fix python testing install directory 2016-04-21 13:54:11 +02:00
Matthias Kuhn
816c322df5 Workaround for buggy mac osx cleanup 2016-04-15 09:20:41 +02:00
Matthias Kuhn
709d3cedd0 Cleanup test application on exit 2016-04-14 12:15:11 +02:00
Matthias Kuhn
3eb7f39281 Geometry testing, reduce default precision 2016-03-27 13:31:15 +02:00
Juergen E. Fischer
f41304637c switch tests to pyqt wrappers 2016-03-21 17:00:26 +01:00
Nyall Dawson
9aabc289ec Indentation 2016-02-28 13:05:51 +11:00
Matthias Kuhn
c79aeba0db Python unittest.expectedFailure improvements
Raises an _UnexpectedSuccess exception
Takes a boolean parameter with a condition under which the test is
expected to fail
2016-02-26 13:40:53 +01:00
Matthias Kuhn
6a8b4075e0 Add method for file comparison to testing lib 2016-02-21 13:13:34 +01:00
Matthias Kuhn
8b84f3adb0 Ignore extra fields on control layer 2016-02-04 17:37:52 +01:00
Matthias Kuhn
70b4f3a242 Don't compare field count 2016-02-04 16:44:11 +01:00
Matthias Kuhn
c21889f945 Add qgis.testing module for generic qgis test helpers 2016-02-04 13:36:13 +01:00