Commit Graph

102 Commits

Author SHA1 Message Date
davemfish d3c278beb4 moved usage logging tests out of ui_tests directory. #673. 2021-10-04 14:56:16 -04:00
James Douglass 344a8caf91 Fixing logging threshold issue for execution tests.
It turns out that the root logger needed to have its level set, as the
root logger's level was propagating to the others.  This is now present
in the context manager, and log messages are being captured as expected
in the tests. RE:#651
2021-09-23 10:31:54 -07:00
James Douglass 22256cbbf4 Removing logging from the execution thread for models.
Now that utils.prepare_workspace is more ubiquitous across InVEST, the
Qt UI is the one case where the execution.Executor thread does not log
the exception and function completion; these are already handled by
prepare_workspace.  There are several other use cases, however, such as
the datastack archiving functionality and validation, where we FOR SURE
do want to log exceptions, so this is now implemented as a conditional
in the Executor thread.  I've also made an effort to test this logging
via a QueueHandler in the tests, but the logging for the execution
completion when an exception _is_ raised does not seem to be recorded by
the QueueHandler and I don't know why.  Since we're deprecating the Qt
UI in the foreseeable future, this is probably not a huge deal.

RE:#651
2021-09-22 14:05:47 -07:00
James Douglass f2d6d25065 Fixing an issue with usage logging.
I encountered a logged ValueError when debugging InVEST issue #651,
where the UI's logging function to extract bounding boxes was failing
when passed a blank string as a filepath.  This is a valid case for an
argument to be and is now handled (and tested).  RE:#651
2021-09-22 13:31:51 -07:00
davemfish e168307ee3 added tests for the new cli function and command. #237. 2021-02-23 17:46:05 -08:00
emlys cb9a443414 fix ui test warnings 2020-11-18 14:43:45 -07:00
James Douglass 753a81a1f8 Merge branch 'release/3.9' of https://github.com/natcap/invest into task/209-reimplement-coastal-blue-carbon
Conflicts:
	Makefile
2020-10-16 15:56:46 -07:00
emlys ef4983afcf update model logging test to use args_spec 2020-10-06 17:11:32 -06:00
James Douglass f65d51e374 Ripping out the Qt UI's Multi input: no longer needed. RE:#209 RE:#17 2020-09-14 18:26:08 -07:00
Doug 150f361a0c I. #143 adding missing ogr import 2020-06-01 14:30:46 -04:00
Doug dd00a8fe38 I. #143 removing testing module from ui test
Removing pgp.testing from test_model_logging and removing unnused
imports and python 2 imports
2020-06-01 13:41:00 -04:00
James Douglass 44439dd921 Rescheduling a timer. RE:#72 2020-04-21 12:07:34 -07:00
James Douglass 0245221e6a Patching up a few failing tests. RE:#72 2020-04-21 11:53:41 -07:00
James Douglass 964afe116c Restoring the skip on ModelTests. RE:#72 2020-04-21 11:23:20 -07:00
James Douglass da339f2708 Reverting model.py, test_ui_inputs.py to state of master. RE:#72 2020-04-21 11:21:56 -07:00
James Douglass e693f8b1f6 Catching an unhandled SystemError occurring in some tests. RE:#72 2020-04-21 11:01:43 -07:00
James Douglass ba91a876b3 Processing events after joining as well. RE:#72 2020-04-21 10:41:41 -07:00
James Douglass df3bedf0ac Processing events for two tests that clearly need it. RE:#72 2020-04-21 10:32:26 -07:00
James Douglass a319cf8bbf Skipping all model tests. #72 2020-04-21 09:56:57 -07:00
James Douglass ee9389d0b5 Removing a pile of events processing. RE:#72 2020-04-14 14:20:23 -07:00
James Douglass 01f0fe14e3 Skipping a problematic test. RE:#72 2020-04-14 12:50:14 -07:00
James Douglass 002247fc96 Removing a tearDown method that used deprecated Qt functions. RE:#72 2020-04-14 11:37:36 -07:00
James Douglass 5a90117e88 Rejiggering the bbox merging test to use synthetic data.
RE:#BITBUCKET-3894
2020-01-22 13:16:28 -08:00
James Douglass 675e83eef2 Removing testing that uses the RPC usage logger. RE:#BITBUCKET-3894 2020-01-21 17:16:19 -08:00
David Fisher 25765d0f30 instead of validating the datastack save path as existing before enabling the save button, create the directories if they don't exist. #BITBUCKET-3938. 2020-01-14 14:30:59 -08:00
James Douglass 96db8c9e54 Correcting a UI test using an old validation construct.
RE:#BITBUCKET-3912
2019-12-11 10:37:50 -08:00
David Fisher 32e1a7733d skipping the class of tests that always crash the appveyor VM. #BITBUCKET-3936. 2019-12-04 15:23:16 -08:00
James Douglass 37baf8f4fa Using fisheries file instead of delineateit for this test.
RE:#BITBUCKET-3908
2019-08-23 10:29:05 -07:00
James Douglass 97729173dd Adding debug logging to the UI's CLI test. RE:#BITBUCKET-3908 2019-08-22 16:54:29 -07:00
James Douglass e47e6af070 Moving GUI tests via the CLI to the ui tests folder.
RE:#BITBUCKET-3908
2019-08-22 15:28:30 -07:00
James Douglass 9ed55be7a9 Removing the CLI tests from the UI_tests repo.
Since this requires the sample data repo, having it run in that test suite
makes more sense froma CI perspective.

RE:#BITBUCKET-3908
2019-08-21 12:01:27 -07:00
James Douglass 1e48949c3e Correcting a path to an InVEST scenario file. RE:#BITBUCKET-3900 2019-07-11 14:22:59 -07:00
James Douglass 5d1fb1ed6c Using the test data repo instead of the sample data repo.
RE:#BITBUCKET-3900
2019-07-11 12:46:27 -07:00
James Douglass 67d86cc8d0 Removing redundant PySide2 import. RE:#BITBUCKET-3900 2019-07-10 17:43:08 -07:00
James Douglass 2eee52f5a5 Moving the CLI tests to the GUI tests.
RE:#BITBUCKET-3900
2019-07-09 11:00:55 -07:00
James Douglass ae0f75d02d Merging heads on this branch. RE:#BITBUCKET-3900 2019-07-03 15:09:30 -07:00
James Douglass 1dd4cdd7ed Removing two tests that don't obviously test something, updating imports.
RE:#BITBUCKET-3900
2019-07-03 15:07:57 -07:00
James Douglass f0ea559b77 Correcting imports for pyside, only importing on python3.
RE:#BITBUCKET-3900
2019-07-01 19:58:24 -07:00
James Douglass 7541c72ced Raising an exception if we can't close the dialog after 6 tries. RE:#BITBUCKET-3900 2019-07-01 16:12:52 -07:00
James Douglass ef5cbc006c Correcting more mock import paths. RE:#BITBUCKET-3900 2019-07-01 16:00:21 -07:00
James Douglass b292cca5e6 Restructuring a loop. RE:#BITBUCKET-3900 2019-07-01 15:57:56 -07:00
James Douglass aa655eccfd Correcting variable name to the Qt Application. RE:#BITBUCKET-3900 2019-07-01 15:47:11 -07:00
James Douglass e65d50d20c Correcting patch import path. RE:#BITBUCKET-3900 2019-07-01 15:46:34 -07:00
James Douglass 310b5e5869 Replacing MagicMock with Mock (PySide2 doesn't seem to like MagicMock).
RE:#BITBUCKET-3900
2019-07-01 15:19:06 -07:00
James Douglass b3e7a2191a Changing how we use qWait. RE:#BITBUCKET-3900 2019-07-01 15:10:11 -07:00
James Douglass 3fab0df21e Catching a bunch of runtimeerrors raised when objects not completely cleaned up.
RE:#BITBUCKET-3900
2019-07-01 14:36:16 -07:00
James Douglass 9fc969d07f Minor update to how WindowTitle is used. RE:#BITBUCKET-3900 2019-07-01 12:41:02 -07:00
James Douglass 013fecd0f9 Correcting more INVEST_SETTINGS accesses.
RE:#BITBUCKET-3900
2019-06-28 16:26:39 -07:00
James Douglass 371400b8eb Updating INVEST_SETTINGS access to use pyqt5-standard form.
RE:#BITBUCKET-3900
2019-06-28 16:16:44 -07:00
James Douglass 36d30cd5be Fixing a bunch of string encoding/decoding issues. RE:#BITBUCKET-3900 2019-06-28 16:05:08 -07:00