Commit Graph

48 Commits

Author SHA1 Message Date
Muhammad Soban Javed
2732934e74 fix: re-enable Django deprecation warnings (#32277)
* fix: re-enable Django deprecation warnings
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-08-07 22:08:00 +05:00
connorhaugh
00b1ce28b9 feat: add library copy management command (#32598)
This PR introduces the "copy" management command, which copies v1 libraries into v2 libraries.
2023-07-10 15:45:18 -04:00
connorhaugh
57fd22ba58 feat: ignore v2 xblocks in independence contract (#32602)
* feat: ignore v2 xblocks in independance contract

* docs: add documentation as to failure point
2023-06-29 16:08:14 -04:00
ruzniaievdm
96b8ba5d6a feat: Create DRF for course settings and course details views out of current Django views (#32397) 2023-06-08 11:07:29 -04:00
Braden MacDonald
8ee1f66ffb feat: Paste Components (OLX) into any Unit in Studio (#31969)
* feat: Implement paste button

* chore: improve docs and add tests for python API

* fix: drive-by fix to use a better API for comparing XML

* feat: track which XBlock something was copied from

* feat: add tests

* feat: enable import linter so content_staging's public API is respected

* fix: error seen when trying to paste drag-and-drop-v2 blocks

* fix: use strip_text=True consistently for XML comparisons

* refactor: rename get_user_clipboard_status to get_user_clipboard

* feat: Better error reporting when pasting in Studio

* chore: convert new test suite to pytest assertions

* refactor: push READY status check into the API per review suggestion

* fix: use strip_text=True consistently for XML comparisons

* fix: store "copied_from_block" as a string to avoid Reference field issues

* fix: minor lint error

* refactor: move data types to data.py per OEP-49
2023-04-27 09:58:04 -07:00
Braden MacDonald
dd927c7fee chore: consolidate two different implementations for serializing XBlocks 2023-04-24 12:16:42 -07:00
Braden MacDonald
626f11f608 test: Import linter: optionally enforce usage of a package's public API (#31903)
* test: warn about dependencies from cms->openedx->lms and vice versa

* test: warn about importing from package's internal implementation code

* chore: Update some imports to use public APIs only

* chore: Update 'bookmarks' app to have stricter public API

* fix: we are sharing 'adapters' from olx_rest_api to content_staging
2023-04-20 11:34:51 -07:00
0x29a
d338f00e39 refactor: rename module (or item) -> block within cms 2023-01-30 18:15:23 +01:00
Muhammad Umar Khan
9c279444df build: add import linter check (#31062)
* build: add import linter check
2022-12-07 12:07:09 +05:00
Kyle McCormick
25df9ca420 refactor: make safe_lxml an ordinary folder in openedx/core/lib (#25689) 2022-05-24 15:35:23 +05:00
Ned Batchelder
66eae81add docs: comments about how pytest finds settings (#29623)
It took a while for me to understand why my setup.cfg setting was only
applying to some tests.  Hopefully these comments will save someone else
some confusion.
2021-12-21 10:47:59 -05:00
Ned Batchelder
e39f9c503a build: suppress Django deprecation warnings (#29528)
Suppress them both in tests (via setup.py and pytest.ini)
and in management command & application runs
(via logsettings.py).

Developers aren't looking at these warnings; they'll be dealt with in a
formal process for upgrading Django.  Suppress them for now so that
important information isn't lost in the noise.
2021-12-15 10:45:12 -05:00
Ned Batchelder
d67a16452f Ensure setup.cfg is only ASCII. CRI-169
I don't understand why this file needs to be ASCII, or why it was only a
problem recently for one installer, since this has been in this file
since 2014.  But CRI-169 has a stack trace, and it's easy enough to make
the file ASCII.
2020-05-01 16:00:53 -04:00
Jeremy Bowman
59768e7498 Fix more deprecation warnings (#23061) 2020-02-10 13:17:25 -05:00
Manjinder Singh
6c69b6d435 Adding code to output pytest warnings. (#22570)
* Added pytest-json-report plugin
	- modifying app-opts in setup.cfg
	- adding hook to all conftest.py files in repo
	- setting report to be saved to test_root/log/warnings.json
	- Writing custom logic to save json report to avoid overwrite if pytest called twice
This was created to allow us to easily parse through test warnings in jenkins
2020-01-02 10:01:52 -05:00
Calen Pennington
b4fe3474e7 Fix/ignore errors caused by a pycodestyle upgrade 2018-10-31 12:34:50 -04:00
Jeremy Bowman
9477ad23d1 TE-2528 Upgrade testing dependencies 2018-04-25 16:37:29 -04:00
Jeremy Bowman
28d291dce7 TE-2527 Move test and dev dependencies out of base.in 2018-04-18 14:44:31 -04:00
Jeremy Bowman
11e134c552 PLAT-1916 Ignore existing usage of deprecated field_data 2018-02-02 16:12:00 -05:00
Jeremy Bowman
7d436a18ee PLAT-1858 Better capture of deprecation warnings 2018-01-12 18:04:32 -05:00
Jeremy Bowman
1dbdee9c54 Revert "PLAT-1858 Better capture of deprecation warnings" 2017-12-18 21:18:02 -05:00
Jeremy Bowman
b26fe5fd24 PLAT-1858 Better capture of deprecation warnings 2017-12-18 14:59:05 -05:00
Ned Batchelder
8b02ce8394 Skip safe_lxml/etree.py in future isorts 2017-12-12 19:39:35 -05:00
Jeremy Bowman
0f51a397cb Exclude .tox directory from quality checks 2017-10-26 13:48:22 -04:00
Jeremy Bowman
ca97e946a6 Switch to pytest for unit tests 2017-09-22 16:07:53 -04:00
Jeremy Bowman
9e3f35db22 PLAT-1676 Use pytest for bok-choy tests 2017-08-14 11:49:39 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Calen Pennington
2690c044c6 Only generate xunit files during CI builds, so that pudb works during development 2016-06-28 10:46:53 -04:00
Calen Pennington
8b3ef8725c In order to minimize contention for the mongodb global lock, use one database per process in tests 2016-05-18 14:39:00 -04:00
Calen Pennington
299b2659c6 Allow tests to run in verbose mode and multiprocess mode (by turning off TestId mode as needed) 2016-05-18 14:39:00 -04:00
Calen Pennington
5249504edc Use xunitmp by default, rather than standard xunit 2016-05-18 14:10:29 -04:00
Calen Pennington
6ebda5ea1f Set standard nose-multiprocessing options 2016-05-18 14:10:29 -04:00
Calen Pennington
9c6e404bd1 Disable rednose, which is incompatible with multiprocessing 2016-05-18 14:10:29 -04:00
Andy Armstrong
4839bf4c21 Ignore node_modules when checking Python quality 2016-01-27 13:41:27 -05:00
Peter Fogg
264f7c4776 Make pep8 ignore test_root/staticfiles directory.
This directory is placed under .gitignore, so we shouldn't be worried
about pep8 errors in Python files placed there.
2015-10-08 09:55:17 -04:00
Ben Patterson
5a843b5b99 Pep8 should ignore pycharm-helpers files on folks' workstations/VMs.
Project-root is the default location for these helper files, and they are being
examined as part of pep8 runs. This change will ensure they are ignored in this case.
2015-04-29 08:39:45 -04:00
Ned Batchelder
283521e62f PEP8 needs to ignore .git 2015-04-23 14:42:20 -04:00
David Baumgold
838ce74a3f Add comments about disabled pep8 rules 2014-12-12 10:21:34 -05:00
David Baumgold
530c16326d Ignore "deprecated form of raising exception" PEP8 warning
We do this intentionally, to preserve tracebacks
2014-12-11 13:04:53 -05:00
David Baumgold
d65d3094cf Update pep8 to 1.5.7 2014-12-11 11:36:18 -05:00
David Baumgold
f45840acb5 Move .pep8 content to setup.cfg 2014-06-06 13:17:46 -04:00
Calen Pennington
da26ae2529 Remove lms/lib from sys.path in favore of using it as the module lms.lib 2013-11-08 11:08:48 -05:00
Calen Pennington
8201b1412e Use XBlock 0.3 2013-09-06 09:45:59 -04:00
Calen Pennington
e7626d2d84 Teach rake test tasks how to re-run failed tests 2013-08-27 09:43:30 -04:00
Ned Batchelder
6a7e291f96 Don't display docstrings when talking about tests, use real test names. 2013-07-09 13:53:46 -04:00
Calen Pennington
9f158774e4 Disable pdb by default when running tests 2013-04-17 12:26:33 -04:00
Calen Pennington
f2cd0bbc97 Add comment about enabling pdb in tests
Uncommenting the pdb=1 line will cause pdb to open on every test
failure, allowing immediate debugging of the failure case
2013-04-17 10:34:48 -04:00
Calen Pennington
f252c62f31 Enable test colors in nosetests
Use setup.cfg to set up default settings when running nose tests. Enable
the rednose library to color test output.
2013-04-17 09:58:52 -04:00