Commit Graph

521 Commits

Author SHA1 Message Date
Ilya.Kazakevich
9614f73c67 CWM-2243: Close suites on the Python side.
Python runners aren't aware of suites: they report ``fully.qualified.test.names``.

These names are splitted to the suites on the Python side, and just before process ends we close all of them.

GitOrigin-RevId: 4e1ad5b308cd393ac8877e1f6e1f616b254a130c
2023-02-01 17:43:40 +00:00
Alexander Koshevoy
98d818cf53 Fix "ValueError: Empty module name" when project dir (first argument of django_test_manage.py) ends in a slash
Note that `os.path.basename(path)` returns an empty string (`''`) when `path` ends in a slash.

GitOrigin-RevId: e400e794d5e0de0cf29ab6796ffac5972f50eb53
2022-02-08 23:25:31 +00:00
Ilya.Kazakevich
da81b0c2d3 Get rid of deprecated method
load_module is deprecated

GitOrigin-RevId: 9a026832e43ae906593c34eab62443bbba0be2d4
2022-01-14 21:36:39 +00:00
Ilya.Kazakevich
f48f813c9a Get rid of deprecated method
load_module is deprecated

GitOrigin-RevId: 390cc2849dfd83b09a4712ac524181f7040b5e61
2022-01-14 17:09:01 +00:00
Ilya.Kazakevich
735f2f3406 PY-51870: Pretty print primitives and dicts
GitOrigin-RevId: d4e57ba58186ffaea4751f150d9564eeeac4476c
2021-12-14 16:25:53 +00:00
Ilya.Kazakevich
cd4e6494a8 PY-32605: use repr for diff in pytest
``assert "[]" == []``
``assert "123" == 123``

is only displayed correctly when we ``repr`` both

GitOrigin-RevId: ff962dffe7341e95ceeda613e557e9de5cb2620f
2021-10-01 10:10:12 +00:00
Semyon Proshev
96ca67b701 Remove support for buildout (PY-49193)
GitOrigin-RevId: 6c9e582d92b7c1c5f43648022abe315906e2786c
2021-09-14 17:08:51 +00:00
Ilya.Kazakevich
3d3c32b0e9 sync teamcity-messages with TC
GitOrigin-RevId: 87ed5cd75205c1cf21ffb43ca3f8fc77bb30c7ca
2021-09-14 14:06:51 +00:00
Bernát Gábor
9cfe2170d3 PY-49452: Do not use distutils package in pytest runner
As it's slated for removal in 3.12 and 3.10 now shows a red deprecation warning.

GitOrigin-RevId: 8badfb3feaab932eb2abf3f44278d0c7d1d4bbcd
2021-09-14 12:47:33 +00:00
Ilya.Kazakevich
362abf7119 Don't use deprecated package distutils, drop ancient behave workaround
GitOrigin-RevId: c116d24976014f5b9ed697d472bd8a9d5a478db9
2021-09-14 12:47:31 +00:00
Ilya.Kazakevich
0d1f3eb8b1 PY-49505: Fix multiline pytest diff
Fixed by
b03ddbfadf

GitOrigin-RevId: 3d1be37673a0b4e6cb5639cda01193a90b326ac1
2021-09-01 19:49:47 +00:00
Ilya.Kazakevich
6a1902e7be PY-49658: fix "--jb-swapdiff" option
Fixed by merging correct version of teamcity runners.
Boolean option brakes all other arguments when used incorrectly

GitOrigin-RevId: e61955cb10fc98eb3dcf741650b79c64a5a573fc
2021-07-20 01:11:06 +00:00
Ilya.Kazakevich
41e0118cc0 PY-48468: Add option to disable "--no-summary" in "Advanced settings".
No need to show summary for pytest in most cases, but some plugins may need it.
So, we add advanced option to enable that

GitOrigin-RevId: 15106a4a68ea2adc048119ad4b45e82640086ce0
2021-06-08 00:00:21 +00:00
Ilya.Kazakevich
9283187fc6 PY-44421: Add new version of plugin that supports passing argument as swap
GitOrigin-RevId: d6a2a0822b2aff65480974b75d1652cc36f319f7
2021-05-21 18:23:58 +00:00
Ilya.Kazakevich
ccca94449f Fixing test after removing legacy test runners
This part was removed by accident

GitOrigin-RevId: d757ed7a3a15125554302803dd58d5994434c6e5
2021-05-21 17:41:03 +00:00
Ilya.Kazakevich
c722b28671 Remove legacy tests
Legacy tests were used for python 2.6, we do not need them anymore

GitOrigin-RevId: bf9137d15e11b40320848e07e2cf3713f23607ce
2021-05-20 16:29:32 +00:00
Ilya.Kazakevich
fabfc4dcc7 PY-47625: Fix doctest runner according to the new API
One argument is missing because API changed many versions ago

GitOrigin-RevId: fb1f8e0befc4ecd0307e602581cf8e5df0eb1e7a
2021-03-30 17:18:09 +00:00
Ilya.Kazakevich
b12ce46fb3 PY-45405: Support pytest < 6.0
GitOrigin-RevId: 1004ca613f7846fa9a3be76b1cceb5d5028a1f8d
2021-01-26 14:06:45 +00:00
Ilya.Kazakevich
81c06493f5 PY-45096: Do not show internal modules in stack trace
Implemented in teamcity-messages

GitOrigin-RevId: 312e7d71009ff66bc22b7ba2d382169e596608b8
2020-12-29 23:42:37 +00:00
Ilya.Kazakevich
fef6e000c1 PY-45096: Report exception type in diff
GitOrigin-RevId: 3b580be875b803a4b9dccecf86c80a4e2b580746
2020-12-22 20:10:15 +00:00
Ilya.Kazakevich
eea900c902 PY-45096: Wrong line for pytest diff called by assertEquals
Logic implemented in ``teamcity-messages``, see changes in diff_tools.py and pytest_plugin.py

GitOrigin-RevId: 8e9cc8cb350e33a9a1cb49ea78ed7ad29c4e1f96
2020-12-17 02:01:55 +00:00
Ilya.Kazakevich
cfee024f04 PY-45405: Do not report same failure several times
* Remove header and footer from pytest
* Do not report default magnitude index title

GitOrigin-RevId: 217afc00e77c725dd76a0897d78d8984ec0d0494
2020-12-16 17:34:24 +00:00
Ilya.Kazakevich
7d364774aa PY-45405: Do not report same failure several times
* Remove header and footer from pytest
* Do not report default magnitude index title

GitOrigin-RevId: a119bf2a1edbc777a359cc3778f475eec69d4188
2020-12-16 14:52:38 +00:00
Ilya.Kazakevich
9303000813 Rewrite get_wsl_ip to C and bundle binary.
It seems that every IJ product needs to know WSL-2 IP, but there are no guarantees for an interpreter/runtime to exist on WSL except glibc and kernel of course.

Binary tool runs everywhere.

It must be compiled statically on the oldest Linux possible. It gives us guarantee that it runs on distros without of glibc (i.e. Alpine).

GitOrigin-RevId: 92b26d4e176cc3a46ede7970a2b08a228d0f89b7
2020-11-18 20:21:35 +00:00
Ilya.Kazakevich
0569005a3c PY-43681: Drop lettuce
Unsupported framework from 2016 which can't run on Py3K. Migrate to Behave.

GitOrigin-RevId: 3bcc1e6b13f117050767d9ef137e13cd80e54a3a
2020-07-31 21:19:15 +00:00
Ilya.Kazakevich
cb899e1dad Warn user if legacy runner is used, remove outdated EP, mark redundant interface as deprecated
GitOrigin-RevId: 9ead5bcf99fd87fb5bde6d6fa88426ddfefebab8
2020-04-26 22:37:36 +00:00
Ilya.Kazakevich
195006a291 Sync teamcity-messages with upstream (should fix PY-41830)
GitOrigin-RevId: 7860d3cee7a035e2e90b6c79b5d10d9dbd9ceb89
2020-04-22 13:51:52 +00:00
Ilya.Kazakevich
b38c954f97 PY-41270: new test runners use `pytest_collection_finish`
``pytest_collection_finish`` is the correct way to obtain number of tests.

GitOrigin-RevId: c636ccc73b176094f113c83cccac91e598708efc
2020-03-26 13:31:44 +00:00
Ilya.Kazakevich
4508e0de9d PY-31836: Use pytest parameter as test name, not keyword.
The correct way to use parameters is to add them to the test name.
"-k" is also works in some cases, but it is not official nor stable.

* pytest runner reports "testname[param]" as metainfo
* we fetch param
* add "parameters" field to the pytest
* glue it with test name

GitOrigin-RevId: 56c5d93fd93a12ba5742b21af51ea04823a9d8f7
2019-12-30 13:34:33 +00:00
Ilya.Kazakevich
820a665815 PY-29154: Return test runner exit code
When test runner returns code > 0 (because of test failure), our runner must do the same.

See issue description for the reason

GitOrigin-RevId: 231c9ab337e80f70872bf6e6f61a397599f18e26
2019-12-23 20:53:08 +00:00
Ilya.Kazakevich
c51f222882 PY-39146: Do not use deprecated API.
See ``load()`` body

GitOrigin-RevId: 822dd2033d2f306c82400c8b1bb29fd769207d7e
2019-12-10 21:08:52 +00:00
Ilya.Kazakevich
75291026e7 PY-29614: Subtests are broken when have names.
Fixed on teamcity-runners side. This commit updates em to the latest version and adds test.
See https://github.com/JetBrains/teamcity-messages/issues/221

GitOrigin-RevId: 2538e88844be6b0f337983e2629985c872ac4f71
2019-11-12 16:40:42 +00:00
Ilya.Kazakevich
4c03903874 PY-31170: Use `PWD` to get workdir in tests because getcwd resolves symlinks.
According to POSIX, getcwd must resolve symbolic links.
But links in backtrace should not be resolved, otherwise link might point to some dir outside of project root.

We check ``PWD`` (works for bash) with fallback to ``
getcwd``

GitOrigin-RevId: 449e5961d0d59c3fe9a627351c79deb83805d58d
2019-11-07 02:40:58 +00:00
Ilya.Kazakevich
9059da3f88 PY-36563: Support WSL2 and simple refactoring to remove copy/paste (PyRemoteCommandLinePatcher)
* Remote process command line must be patched to support debug, profile etc.
It is now done with PyRemoteCommandLinePatcher.kt

* WSL2 must run with closed stdin because of MS bug.
So, we check if we are on WSL2, and close it.

* WSL2 uses different approach to connect to host for debug (see PyWSLSocketProvider)

* WSL2 needs several commands to run to get list of mappings, so we wrap it with modal dialog.

GitOrigin-RevId: 1789afd9832f048d10d972f5e0f23977e92f973f
2019-10-16 19:25:54 +00:00
Ilya.Kazakevich
29ca363a7c PY-37841: Use official hook API to parse config instead of dirty hack.
See Bruno's comment in issue.

GitOrigin-RevId: af0c4bee1f415a2148e7a824630a949ba3db0051
2019-10-01 00:31:27 +00:00
Ilya.Kazakevich
ef0b36a968 PY-37841: Do not monkeypatch prepareconfing in pytest: leads to double plugin loading.
With testdir fixture, pytest runs test under separate pytest (which may be inline or separate process).

Previously we monkeypatched prepareconfig not to call it twice.
But this approach fails with testdir, because same config returned twice leading to double plugin registration.
See comment in YT

GitOrigin-RevId: bd9f11a2a10900fa3c059791d7c0183a20b1ed70
2019-10-01 00:31:27 +00:00
Ilya.Kazakevich
c4e61f6c9a IDEA-CR-52314 PY-31751: fox after review
GitOrigin-RevId: d2e379614dcb38f4f326fbb6b68791cd05f98914
2019-10-01 00:31:27 +00:00
Ilya.Kazakevich
d002bd2dab PY-31751: Do not use deprecated API in doctest runner to prevent warnings.
For 3.3+ we now use new api. We also use "-W error" in tests to make sure no warning issued

GitOrigin-RevId: a668da71d8705f061873a4b2c09a4fc3f0082472
2019-09-10 20:31:54 +00:00
Ilya.Kazakevich
e0b0e86751 PY-35423: Append helpers to sys.path.
First record in sys.path must be script directory. If it is helpers path, we pop it, and move to the end.

GitOrigin-RevId: 3ca787ebd9a48db15984e5d0552c38073ce09c2b
2019-08-29 19:42:23 +00:00
Ilya.Kazakevich
ffadfee6cb IDEA-CR-51828: PY-23394, PY-18501, PY-37571: Use new test runners when running tox
When we see test runner in "commands" section of tox, we substitute it with our test runners so user may benefit from test trees.

We also pass "offset" because test runners must use it as "parent node".

Set "_jb_do_not_patch_test_runners" to disable this substitution

(cherry picked from commit c7d469e1fed52f2d7fe3aec6d96b665c4aa80a4e)

GitOrigin-RevId: b9eec43a6d26fecb72270b733266ef31989fec2c
2019-08-28 13:07:04 +00:00
Ilya.Kazakevich
fea6370f55 PY-35423: Add helpers dir to sys.path.
Env plugin could break PYTHONPATH.
Helpers import each other, so we need to have helpers dir in sys.path

GitOrigin-RevId: d47b763765f6ff26ab77898f03008c4078e28acc
2019-07-02 06:52:16 +03:00
Rustam Vishnyakov
123242c4b2 EditorConfig documentation test
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
2019-06-16 04:03:21 +03:00
Egor Zhdan
c1813cfb52 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-16 04:02:08 +03:00
Anna Kozlova
91f7445298 constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
2019-06-13 03:15:49 +03:00
Egor Zhdan
39d2d77155 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-13 03:14:35 +03:00
Aleksey Pivovarov
322db66a12 Recover after problematic merge
This commit reverts 65a557bb38f6ac03afa9aabaf02cb8d99fc68a91
                    3f5cfd958d9b6b54393c15983ac94f519c37fe61

GitOrigin-RevId: 8fb8ccbb17d0e217a83f265c185a943b0f5a7ed6
2019-05-03 01:52:21 +03:00
Nicolay Mitropolsky
9b850726ee [uast-groovy] UInjectionHost support
GitOrigin-RevId: 49ec454d1831796fa63b77fdc965f61985bf877e
2019-05-03 01:47:46 +03:00
Vladimir Plyashkun
c33e69a545 CPP-16098 - Lags during inplace rename typing
- reverted some of the changes

GitOrigin-RevId: c7c07b80a76c29794ef31e0e916e62f7f302917a
2019-05-03 01:47:14 +03:00
Leonid Bushuev
34be4bbf7d Apply the change from Develar: cleanup - specify UTF_8 charset explicitly
GitOrigin-RevId: 3f5cfd958d9b6b54393c15983ac94f519c37fe61
2019-05-03 01:46:11 +03:00
Vladimir Plyashkun
61a3e18b78 Merge branch 'master' into vplyashkun/inplace_rename_lags
GitOrigin-RevId: aaecc2a32e4e42de827efb45b8df733874a722e4
2019-05-03 01:41:29 +03:00