Commit Graph

735 Commits

Author SHA1 Message Date
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Jeremy Bowman
63574e12b8 Remove pytest version constraint (#22626)
Fix the issue that was preventing us from upgrading pytest.  pytest does some manipulation of test packages that prevents `pkg_resources` from loading resources from them, but used to contain a workaround for the problem.  That workaround was [removed](https://github.com/pytest-dev/pytest/issues/5392) in 4.6.0 as a performance enhancement when pytest switched from `pkg_resources` to `importlib-metadata` for its own entrypoint handling.  This tripped up one of our test modules which defined classes that loaded templates from inside a test package.  Moving these resources to the parent package fixes the problem.

More and more, `pkg_resources` is being abandoned in favor of `importlib-metadata` and `importlib_resources` as they have a simpler design with much better performance.  However, `importlib_resources` doesn't support loading files from any directory which isn't itself a Python package (and doesn't allow direct use of paths including directories within the package).  Jinja2 chose a [different approach](https://github.com/pallets/jinja/pull/1082) that we may want to emulate in our resource handling.

Also fixed usage of a removed `pytest.raises()` parameter and a bug in our configuration of the `common/lib` tests that became a problem after the upgrade.
2019-12-30 09:10:57 -05:00
Jeremy Bowman
052f853ec1 Fix Jenkins virtualenv cleanup (#22356) 2019-11-21 11:05:05 -05:00
Feanil Patel
733f6f8f24 Make the count a number because comparing NoneTypes and numbers isn't a thing in python 3. 2019-11-06 15:58:03 -05:00
Feanil Patel
e863c50054 Fix pep 8 violations. 2019-11-06 13:39:07 -05:00
Jeremy Bowman
a6b8cbe627 Remove obsolete field type BOM-996 (#22203) 2019-10-31 15:23:58 -04:00
Troy Sankey
1312e4fedf Enable PII Annotations checking enforcement
DE-1764
2019-10-29 14:47:00 -04:00
Feanil Patel
5bfdcad0f5 Make settings regex non greedy.
I'm surprised this didn't cause an issue before but as far as I can
figure this should always be non-greedy.  I think it worked before
because the items we were looking for was previously the last item
in the list but that is no longer the case in python 3 because of
dictionary order changes.
2019-10-22 14:19:42 -04:00
Brittney Exline
6e2887f851 Add enterprise portal links to user dropdown menu and dashboard alerts. (#21833) 2019-10-09 16:01:41 -04:00
Jeremy Bowman
6f3e1e7e3d Fix remaining pavelib test failures BOM-598 (#21819) 2019-09-27 10:52:22 -04:00
Jeremy Bowman
ae2c3b8edf Fix mocks of open() - BOM-597 2019-09-19 13:53:37 -04:00
Feanil Patel
61544f0e2c Fix paver for python 3. 2019-09-12 10:17:25 -04:00
Feanil Patel
d01df30aac Remove pytest command tests.
These tests essentially duplicate the logic for how the pytest commands
are generated and then compare the duplicated logic to the original
logic.  This is pretty brittle and since we're running all the variants
here pretty regularly I think we have other ways of knowing if we caused
the command to break.

I don't think these tests are providing sufficient value to merit their
added complexity.
2019-09-09 10:52:57 -04:00
Feanil Patel
f2445cfe36 Turn off hash randomization on the xdist workers as well. 2019-09-06 17:04:17 -04:00
Feanil Patel
3ec196405c Merge pull request #21582 from edx/feanil/fix_more_test_collection_issues
Feanil/fix more test collection issues
2019-09-06 11:01:45 -04:00
Feanil Patel
f1ec3e97a9 Fix i18n extract command. 2019-09-05 16:31:48 -04:00
Feanil Patel
6c5780c807 The version of python2 we're running doesn't have the backported alias. 2019-09-05 15:54:16 -04:00
Feanil Patel
f068bab7ab Import EnvironmentVarGuard from the new location that's valid in 2.7 and 3.5 2019-09-05 11:15:00 -04:00
Calen Pennington
37c92fe8d4 Merge pull request #21354 from cpennington/specific-wtw-context-for-s3-files
Set a specific WTW context to name coverage files to upload/download …
2019-08-30 12:22:37 -04:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
Calen Pennington
b7f3223ea4 Set a specific WTW context to name coverage files to upload/download from s3 2019-08-16 12:57:19 -04:00
Calen Pennington
98f740f71a Merge pull request #21270 from cpennington/upload-correct-coverage-file
Upload the coverage report from reports/${TEST_SUITE}.coverage
2019-08-05 10:47:48 -04:00
Feanil Patel
2afc27741e Merge pull request #21266 from edx/feanil/moto_changes
Upgrade moto to support python3.
2019-08-02 15:07:43 -04:00
Feanil Patel
9926fa0fbd Moto got better at checking permissions in their mock.
Since we want anonymous read of these objects, we have to be explicit about
the bucket permissions or the test will fail.
2019-08-02 13:42:13 -04:00
Feanil Patel
a5afacf62a These tests don't test anything interesting.
They are running into issues because of a bug in moto but looking closer
at what they are testing.  Both tests test the happy path of the
underlying function.  In the happy path scenario all boto calls succeed
and all theses test do is test that but with all the boto calls mocked
out.  So we're just testing whether the mock is a good mock of boto
which is not useful.
2019-08-02 13:42:06 -04:00
Calen Pennington
ea8c8e8348 Test the django admin view, and that it can be loaded 2019-08-02 13:27:16 -04:00
Calen Pennington
8f457d2045 Upload the coverage report from reports/${TEST_SUITE}.coverage 2019-07-31 14:55:30 -04:00
Calen Pennington
d0b160888b Archive all coverage reports, named by test context 2019-07-30 15:18:25 -04:00
Calen Pennington
82c49f0db9 Separate bokchoy coverage files by shard 2019-07-26 14:58:44 -04:00
Calen Pennington
fdd212248a Check the test-suite specific coverage file, and upload it earlier in the process 2019-07-24 13:13:30 -04:00
Calen Pennington
5025567711 Add paver commands and environment variables to capture and run coverage-driven test selection 2019-07-24 12:06:07 -04:00
Calen Pennington
1823d9f098 Add django app for running Coverage who-tests-what in bokchoy 2019-07-24 10:13:46 -04:00
Ned Batchelder
83f66af978 Merge pull request #21138 from edx/nedbat/master-wtw
Who-tests-what, rebased onto master, with make upgrade
2019-07-23 11:48:47 -04:00
Aarif
dc6e72652a Merge pull request #21045 from edx/INCR-391
INCR-391 Python 3 compatibility
2019-07-23 13:28:49 +05:00
aarif
bb705970b0 ran python-modernize and isort on files mentioned in INCR-391
changes made to comply with quality

ran python-modernize and isort on files mentioned in INCR-391
2019-07-22 13:48:52 +05:00
aarif
0f3cc01f59 ran python-modernize and isort on files mentioned in INCR-390
ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390
2019-07-22 13:40:35 +05:00
Ned Batchelder
12ca7b8ab7 Name coverage data files so they won't overwrite each other. 2019-07-20 12:21:05 -04:00
Feanil Patel
ad2444204a Deal with xss linter. 2019-07-17 12:26:21 -04:00
Feanil Patel
a781523c91 Convert what's left of pavelib. 2019-07-17 12:26:21 -04:00
Awais Qureshi
f88bb74550 Merge pull request #21048 from edx/awais786/INCR-392
INCR-392
2019-07-17 18:57:16 +05:00
Ayub
08e793147d Merge pull request #21040 from edx/INCR-388
INCR-388 python3 compatibility
2019-07-17 18:56:28 +05:00
Awais Qureshi
281bf3e487 Merge pull request #21044 from edx/awais786/INCR-389
INCR-389
2019-07-17 18:51:57 +05:00
Ayub khan
07f907ec56 INCR-388 python3 compatibility 2019-07-15 13:15:11 +05:00
Amit
0044bef4fd INCR-393: Updates on Python 3.x (#21054) 2019-07-11 10:21:47 -04:00
arbisoft
0726356d7c Fixing python-modernize issues. 2019-07-10 18:35:47 +05:00
arbisoft
f6a8894803 Fixing python-modernize issues. 2019-07-10 17:32:32 +05:00
Michael Youngstrom
139cdb8ba2 Switch testing from ecs to ec2 (#20846) 2019-06-27 22:04:02 -04:00
Jeremy Bowman
c1c4cf5bf7 Remove more unused pa11ycrawler code (#20690) 2019-05-24 15:22:08 -04:00
Jeremy Bowman
a9cd9de89f TE-2647 Stop running pa11ycrawler (#20682) 2019-05-24 11:02:49 -04:00