forked from pool/python-mutmut
e155afa4c7
- version update to 2.0.0 * New execution model. This should result in some modest speed improvements when using pytest. * A special execution mode when using the hammett test runner. This is MUCH MUCH faster. Please try it! * Dropped support for python < 3.7. If you need to use mutmut on older versions of python, please use mutmut 1.9.0 * Some other speed improvements. * `mutmut run 7` will always rerun the mutant `7` * `mutmut show <filename>` to show all mutants for that file * `mutmut run <filename>` to run mutation testing on that file * New experimental plugin system: create a file `mutmut_config.py` in your base directory. In it you can have an `init()` function, and a `pre_mutation(context)` function. You can set `context.skip = True` to skip a mutant, and you can modify `context.config.runner`, this is useful to limit the tests. Check out the `Context` class for what information you get. * Better display of `mutmut show`/`mutmut result` * Fixed a spurious mutant on assigning a local variable with type annotations * mutmut now will rerun tests without mutation when tests have changed. This avoids a common pitfall of introducing a failing test and then having all mutants killed incorrectly * Added `mutmut html` report generation. * Bugfix for multiple assignment. Mutmut used to not handle `foo = bar = baz` correctly (Thanks Roxane Bellot!) * Bugfix for incorrect mutation of "in" operator (Thanks Roxane Bellot!) * Fixed bug where a mutant survived in the internal AST too long. This could cause mutmut to apply more than one mutant at a time. * Vastly improved startup performance when resuming a mutation run. * Added new experimental feature for advanced config at runtime of mutations - modified patches % pr_134.patch (extended) - deleted patches - no-direct-python-call.patch (merged to pr_134.patch) OBS-URL: https://build.opensuse.org/request/show/789811 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mutmut?expand=0&rev=5
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From bd3866316949f8ba7162e0292be0776d6f51cf50 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Lapointe <hunter_spawn@hotmail.com>
|
|
Date: Tue, 23 Jul 2019 08:55:15 -0400
|
|
Subject: [PATCH] Use sys.executable as default python executable
|
|
|
|
It's more likely to be the correct Python executable in case where someone specified the executable when running mutmut.
|
|
---
|
|
mutmut/__main__.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Index: mutmut-2.0.0/mutmut/__main__.py
|
|
===================================================================
|
|
--- mutmut-2.0.0.orig/mutmut/__main__.py 2020-03-26 09:45:09.000000000 +0100
|
|
+++ mutmut-2.0.0/mutmut/__main__.py 2020-03-30 16:01:03.781625630 +0200
|
|
@@ -101,7 +101,7 @@ null_out = open(os.devnull, 'w')
|
|
@config_from_setup_cfg(
|
|
dict_synonyms='',
|
|
paths_to_exclude='',
|
|
- runner='python -m pytest -x --assert=plain',
|
|
+ runner='"' + sys.executable + '" -m pytest -x',
|
|
tests_dir='tests/:test/',
|
|
pre_mutation=None,
|
|
post_mutation=None,
|
|
Index: mutmut-2.0.0/tests/test_main.py
|
|
===================================================================
|
|
--- mutmut-2.0.0.orig/tests/test_main.py 2020-03-26 09:45:09.000000000 +0100
|
|
+++ mutmut-2.0.0/tests/test_main.py 2020-03-30 16:03:15.066124033 +0200
|
|
@@ -94,8 +94,8 @@ def create_filesystem(tmpdir, file_to_mu
|
|
with open(join(test_dir, 'setup.cfg'), 'w') as f:
|
|
f.write("""
|
|
[mutmut]
|
|
-runner=python -m hammett -x
|
|
-""")
|
|
+runner={} -m hammett -x
|
|
+""".format(sys.executable))
|
|
|
|
with open(join(test_dir, "foo.py"), 'w') as f:
|
|
f.write(file_to_mutate_contents)
|