Henrik Levkowetz
a96c6c4c5b
Tweaked the test runner to more consistently force the test coverage tests to be run last.
...
- Legacy-Id: 15030
2018-04-08 12:42:03 +00:00
Henrik Levkowetz
d6e4404d63
Only do coverage set/reset operations if we're in test mode. Fixes a 500 error during draft submission yang checking.
...
- Legacy-Id: 14569
2018-01-25 11:31:38 +00:00
Henrik Levkowetz
9be7d57a03
Tweaked the test-runner random state handling to display the correct random state filename and make sure to set the same random state.
...
- Legacy-Id: 14209
2017-10-14 12:05:01 +00:00
Henrik Levkowetz
2c1438c240
Moved unidecode_name from utils.text to person.name.
...
Modified UserFactory to use a new locale for each new user, instead of the
same locale for a whole test run. This (almost) ensures the exercise of
code to deal with non-ascii names, something which would not happen if a
locale with ascii names was chosen at the start of a run.
Modified name.initials() to not use non-word characters as initials.
Modified unidecode_name() to do more normalization, to conform to the
conventions used in internet-drafts.
Added saving of the factory-boy random state in order to be able to re-run
a test suite with the same pseudo-random sequence as in a previous failed
run.
Fixed an issue with email formatting in test_api_submit_ok().
Modified the draft author extraction code to deal better with names with
embedded apostrophes.
- Legacy-Id: 14141
2017-09-20 15:36:30 +00:00
Henrik Levkowetz
1eeaf49c5c
Added an error exit when the test runner is invoked with incompatible switches (--parallel and --html-report)
...
- Legacy-Id: 14024
2017-08-02 13:00:16 +00:00
Henrik Levkowetz
d00921b94b
Added a new release-coverage format which whould make it easier to show line-by-line code test coverage changes in the future.
...
- Legacy-Id: 13967
2017-07-24 17:38:00 +00:00
Henrik Levkowetz
eceed7476d
Added the html_report switch setting to the test runner object.
...
- Legacy-Id: 13822
2017-07-09 18:10:51 +00:00
Henrik Levkowetz
ca921fe45d
Added a switch to control generation of the code coverage html report, which now defaults to false. The report can be generated post-testing with "coverage html -d static/coverage/".
...
- Legacy-Id: 13821
2017-07-09 16:50:38 +00:00
Henrik Levkowetz
d26c7085c6
Added code coverage settings and configuration to ignore debug-related lines of code.
...
- Legacy-Id: 13817
2017-07-09 15:00:22 +00:00
Henrik Levkowetz
f6f0278859
Changed the url coverage code to handle deeper chains of url includes, and to handle url includes through url lists in addition to url modules. Added information in the release coverage dictionaries about the view functions coupled to the urls.
...
- Legacy-Id: 13706
2017-06-22 15:07:06 +00:00
Henrik Levkowetz
4dcdda08d2
Added a test to the test suite which checks if there are interleaved schema and data migrations that have not been released yet. Having split migrations, first all schema and then all data, will permit doing 2 sequential releases; but if the data and schema migrations are interleaved (beyond this) it is problematic to arrange for release without ending up with a prolonged period when running code and table structure is out of sync (while the normally more time-consuming data migrations run).
...
- Legacy-Id: 13576
2017-06-09 21:37:14 +00:00
Henrik Levkowetz
76628be3fd
Merged in ^/branch/iola/author-stats-r13145 from olau@iola.dk, and fixed some tests in code which moved after the latest merge with trunk. The test suite passes, but the migrations are _not_ ready to run, because of numbering conflicts (again due to code changes on trunk since the latest sync).
...
- Legacy-Id: 13479
2017-05-31 20:59:26 +00:00
Henrik Levkowetz
d6b9392f72
Fixed an if-statement which incorrectly disabled coverage testing when the parallel testing count was set to 1.
...
- Legacy-Id: 13231
2017-04-18 16:47:28 +00:00
Ole Laursen
a1ba9dfb0a
Remove accidentally committed debug
...
- Legacy-Id: 13160
2017-03-28 14:56:06 +00:00
Ole Laursen
5b677dc6ba
Merge author stats branch into new branch from trunk
...
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Henrik Levkowetz
14c748df98
Changed the creation of temporary test dirs to use names which include the test class name, in order to make it possible to run test cases in parallel. Disabled coverage testing when running in parallel (those classes cannot be pickled and distributed to the test runner threads, and also won't pass coverage data back). Tweaked the TestCase.tempdir() method.
...
- Legacy-Id: 13157
2017-03-27 21:41:18 +00:00
Ole Laursen
5608ad0061
Move the assert on new X in the test coverage up before the percentage
...
to try get the list of URLs out before the percentage
- Legacy-Id: 13144
2017-03-27 08:45:20 +00:00
Lars Eggert
8a70e9773d
Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
...
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz
5928bd9faa
Added svn symlink check and creation to test setup. Forced test settings to use an empty INTERNAL_IPS list for consistency in code coverage figures.
...
- Legacy-Id: 12929
2017-02-28 18:02:30 +00:00
Henrik Levkowetz
8930d29a8e
Merged in Django-1.10 upgrade work from ^/personal/henrik/6.43.1-django-1.10
...
- Legacy-Id: 12881
2017-02-19 18:18:00 +00:00
Henrik Levkowetz
7f607c51d2
Changed from old-style to new-style middleware.
...
- Legacy-Id: 12824
2017-02-12 17:07:48 +00:00
Henrik Levkowetz
aa5e61d958
Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
...
in order to autogenerate dotted path url pattern names. Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.
Changed some imports to prevent import of ietf.urls before django
initialization was complete.
Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.
Started converting old-style middleware classes to new-style middleware
functions (incomplete).
Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.
Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.
Rewrote the filename argument handling in a management command which had
broken with the upgrade.
- Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz
40e8380751
Merged django 1.9 work forward to copy of trunk @6.41.0
...
- Legacy-Id: 12756
2017-01-30 23:13:02 +00:00
Henrik Levkowetz
79c44d25ea
Changed settings_sqlitetest so that local developer additions to context processors and middleware classes are avoided.
...
- Legacy-Id: 12723
2017-01-24 20:42:51 +00:00
Henrik Levkowetz
450c39af23
Changed the failure leeway of the code coverage test percentage from 0.005% back to 0.02%.
...
- Legacy-Id: 12707
2017-01-19 20:01:19 +00:00
Henrik Levkowetz
3944ab95cc
Django 1.9: Supplied a required argument to TemplateDoesNotExist()
...
- Legacy-Id: 12616
2016-12-22 17:14:51 +00:00
Henrik Levkowetz
65481b5df7
Moved warnings settings from manage.py and test_runner.py to one single place, settings.py. Decreased the verbosity level when invoking 'loaddata' from the test runner.
...
- Legacy-Id: 12535
2016-12-15 13:25:20 +00:00
Henrik Levkowetz
8e56935cfd
Undid commit 12527, which contained much too much.
...
- Legacy-Id: 12528
2016-12-15 10:38:54 +00:00
Henrik Levkowetz
e3c6e0ac6b
Changed the state shown in all_id.txt for drafts which have entered IESG processing, but then been replaced, to show as 'Replaced' instead of 'In IESG Processing'. This is consistent with how they are shown in all_id2.txt.
...
- Legacy-Id: 12527
2016-12-15 10:36:15 +00:00
Henrik Levkowetz
6304bfda69
Fixed template_coverage_collection initialisation. Tweaked a message. Updated coverage numbers.
...
- Legacy-Id: 12471
2016-12-07 11:33:33 +00:00
Henrik Levkowetz
8f6e51839f
Fixed some additional places to use the new settings.TEMPLATES structure.
...
- Legacy-Id: 12459
2016-12-05 19:04:27 +00:00
Henrik Levkowetz
0bb7854591
Merged django18 work forward to 6.39
...
- Legacy-Id: 12449
2016-12-05 14:01:25 +00:00
Henrik Levkowetz
b897519fff
Changed the test runner to use the verbosity set on the command line when loading fixtures.
...
- Legacy-Id: 12446
2016-12-05 12:56:53 +00:00
Henrik Levkowetz
554ec2d78c
Removed an unused import
...
- Legacy-Id: 12406
2016-11-28 21:04:15 +00:00
Henrik Levkowetz
623ce0e1bd
Merged in [12378] from rjsparks@nostrum.com:
...
Change the lines saying that a test has failed to make it easier to cut-paste to run the failed test again.
- Legacy-Id: 12386
Note: SVN reference [12378] has been migrated to Git commit be51bc2e78
2016-11-18 10:45:40 +00:00
Robert Sparks
be51bc2e78
Change the lines saying that a test has failed to make it easier to cut-paste to run the failed test again. Commit ready for merge.
...
- Legacy-Id: 12378
2016-11-17 02:52:45 +00:00
Henrik Levkowetz
964d34282f
Added common patterns for template file names to ignore when testing template parsing and template test coverage.
...
- Legacy-Id: 12354
2016-11-16 02:14:32 +00:00
Henrik Levkowetz
888bd44a10
Stash the test results summary in ./.testresults instead of ./testresults, to avoid visual littering.
...
- Legacy-Id: 12272
2016-11-07 17:11:48 +00:00
Henrik Levkowetz
8d1aca19cc
Rewrote the template coverage loader function to a proper template loader class.
...
- Legacy-Id: 12261
2016-11-03 20:51:06 +00:00
Henrik Levkowetz
7b6407dfed
Rewrote the test runner command-line switch declarations to use parser.add_argument() instead of the now unsupported option_list class attribute.
...
- Legacy-Id: 12251
2016-11-03 20:07:22 +00:00
Henrik Levkowetz
3854c832a0
Change things so that the reorder_by setting has an effect on the test ordering. It didn't before, as CoverageTest was a subclass of the earlier entries in the reorder_by setting.
...
- Legacy-Id: 12039
2016-09-26 17:48:26 +00:00
Henrik Levkowetz
e3020686a8
Added a global declaration
...
- Legacy-Id: 11647
2016-07-13 16:00:41 +00:00
Henrik Levkowetz
a405449150
Cached the list of template paths in test_runner.py so we can call it multiple times cheaply.
...
- Legacy-Id: 11482
2016-06-28 04:44:25 +00:00
Henrik Levkowetz
a36cf95572
Refactored the code to skip coverage testing a bit, and added skipping of template and url coverage.
...
- Legacy-Id: 11472
2016-06-24 15:39:59 +00:00
Henrik Levkowetz
6fa181763b
Changed the code test coverage checking to never register coverage counts for tests that are sometimes skipped. Removed now unwanted skip settings from the releasetest settings.
...
- Legacy-Id: 11453
2016-06-21 20:39:28 +00:00
Henrik Levkowetz
2191ec3cbd
Removed logging through ietf.utils.log.log when running tests -- should shave another 15% off the test suite run time.
...
- Legacy-Id: 10454
2015-11-08 14:26:41 +00:00
Henrik Levkowetz
fdc7dea3df
Merged in [10097] from olau@iola.dk, in order to speed up the test suite.
...
- Legacy-Id: 10453
Note: SVN reference [10097] has been migrated to Git commit 99a9cb5569
2015-11-08 14:24:19 +00:00
Henrik Levkowetz
bfa222b782
Added a switch to the 'test' command, to write short test results to file, changing the default which used to be to always write these.
...
- Legacy-Id: 10270
2015-10-22 20:37:03 +00:00
Henrik Levkowetz
c17ea94b08
Updated the code to use version 4.0.1 of coverage.py for code coverage measurements. Moved the code which starts coverage measurement to settings_sqlitetest.py to avoid coverage measurements running when not doing tests. Did some additional coveage measurement refactoring.
...
- Legacy-Id: 10238
2015-10-18 20:01:57 +00:00
Henrik Levkowetz
90b97468a9
Changed to use a gzipped release coverage JSON file, instead of a plain JSON file, if the name given in settings.py ends in .gz. Reduces the current release coverage file size from ~1.6MB to ~200kB. This is a preparation for saving more information in the release coverage file than we currently do.
...
- Legacy-Id: 10235
2015-10-18 14:32:36 +00:00