forked from pool/python-mutmut
Accepting request 789963 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/789963 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mutmut?expand=0&rev=2
This commit is contained in:
commit
ab66da826e
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:608f6368572594d673c798b420fdd0298a1ce5a52a398072f5a52ae8de897d0f
|
|
||||||
size 42053
|
|
3
2.0.0.tar.gz
Normal file
3
2.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9302546f4f1f64544d3f4839712a8ea4c82ed557ac6138d49d8ba328e12c0fb2
|
||||||
|
size 46395
|
@ -1,13 +0,0 @@
|
|||||||
Index: mutmut-1.6.0/tests/test_main.py
|
|
||||||
===================================================================
|
|
||||||
--- mutmut-1.6.0.orig/tests/test_main.py
|
|
||||||
+++ mutmut-1.6.0/tests/test_main.py
|
|
||||||
@@ -337,7 +337,7 @@ def test_use_coverage(capsys, filesystem
|
|
||||||
assert int(root.attrib['disabled']) == 0
|
|
||||||
|
|
||||||
# generate a `.coverage` file by invoking pytest
|
|
||||||
- subprocess.run(["python", "-m", "pytest", "--cov=.", "foo.py"])
|
|
||||||
+ subprocess.run([sys.executable, "-m", "pytest", "--cov=.", "foo.py"])
|
|
||||||
assert os.path.isfile('.coverage')
|
|
||||||
|
|
||||||
result = CliRunner().invoke(climain, ['run', '--paths-to-mutate=foo.py', "--test-time-base=15.0", "--use-coverage"], catch_exceptions=False)
|
|
25
pr_134.patch
25
pr_134.patch
@ -8,16 +8,31 @@ It's more likely to be the correct Python executable in case where someone speci
|
|||||||
mutmut/__main__.py | 2 +-
|
mutmut/__main__.py | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
Index: mutmut-1.6.0/mutmut/__main__.py
|
Index: mutmut-2.0.0/mutmut/__main__.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mutmut-1.6.0.orig/mutmut/__main__.py
|
--- mutmut-2.0.0.orig/mutmut/__main__.py 2020-03-26 09:45:09.000000000 +0100
|
||||||
+++ mutmut-1.6.0/mutmut/__main__.py
|
+++ mutmut-2.0.0/mutmut/__main__.py 2020-03-30 16:01:03.781625630 +0200
|
||||||
@@ -193,7 +193,7 @@ class Progress(object):
|
@@ -101,7 +101,7 @@ null_out = open(os.devnull, 'w')
|
||||||
@config_from_setup_cfg(
|
@config_from_setup_cfg(
|
||||||
dict_synonyms='',
|
dict_synonyms='',
|
||||||
paths_to_exclude='',
|
paths_to_exclude='',
|
||||||
- runner='python -m pytest -x',
|
- runner='python -m pytest -x --assert=plain',
|
||||||
+ runner='"' + sys.executable + '" -m pytest -x',
|
+ runner='"' + sys.executable + '" -m pytest -x',
|
||||||
tests_dir='tests/:test/',
|
tests_dir='tests/:test/',
|
||||||
pre_mutation=None,
|
pre_mutation=None,
|
||||||
post_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)
|
||||||
|
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 30 14:06:25 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 15 07:51:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Oct 15 07:51:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-mutmut
|
# spec file for package python-mutmut
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -20,22 +20,23 @@
|
|||||||
# tri.declarative is Python 3 only
|
# tri.declarative is Python 3 only
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-mutmut
|
Name: python-mutmut
|
||||||
Version: 1.6.0
|
Version: 2.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python mutation testing
|
Summary: Python mutation testing
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/boxed/mutmut
|
URL: https://github.com/boxed/mutmut
|
||||||
Source: https://github.com/boxed/mutmut/archive/%{version}.tar.gz
|
Source: https://github.com/boxed/mutmut/archive/%{version}.tar.gz
|
||||||
Patch1: pr_134.patch
|
Patch1: pr_134.patch
|
||||||
Patch2: no-direct-python-call.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-click
|
Requires: python-click
|
||||||
Requires: python-glob2
|
Requires: python-glob2
|
||||||
|
Requires: python-hammett
|
||||||
Requires: python-junit-xml >= 1.8
|
Requires: python-junit-xml >= 1.8
|
||||||
Requires: python-parso
|
Requires: python-parso
|
||||||
Requires: python-pony
|
Requires: python-pony
|
||||||
|
Requires: python-setuptools
|
||||||
Requires: python-tri.declarative >= 3.0.0
|
Requires: python-tri.declarative >= 3.0.0
|
||||||
Recommends: python-coverage
|
Recommends: python-coverage
|
||||||
Recommends: python-pytest
|
Recommends: python-pytest
|
||||||
@ -45,6 +46,7 @@ BuildArch: noarch
|
|||||||
BuildRequires: %{python_module click}
|
BuildRequires: %{python_module click}
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
BuildRequires: %{python_module glob2}
|
BuildRequires: %{python_module glob2}
|
||||||
|
BuildRequires: %{python_module hammett}
|
||||||
BuildRequires: %{python_module junit-xml >= 1.8}
|
BuildRequires: %{python_module junit-xml >= 1.8}
|
||||||
BuildRequires: %{python_module mock >= 2.0.0}
|
BuildRequires: %{python_module mock >= 2.0.0}
|
||||||
BuildRequires: %{python_module parso}
|
BuildRequires: %{python_module parso}
|
||||||
@ -64,11 +66,9 @@ Python mutation testing.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n mutmut-%{version}
|
%setup -q -n mutmut-%{version}
|
||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
sed -i 's/==/>=/' *requirements.txt
|
sed -i 's/==/>=/' *requirements.txt
|
||||||
# Remove maximum pins any anything that follows
|
# Remove maximum pins any anything that follows
|
||||||
sed -Ei 's/,?<=?.*$//' test_requirements.txt
|
sed -Ei 's/,?<=?.*$//' test_requirements.txt
|
||||||
|
|
||||||
sed -i '1{/^#!/d}' mutmut/__main__.py
|
sed -i '1{/^#!/d}' mutmut/__main__.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -79,7 +79,7 @@ sed -i '1{/^#!/d}' mutmut/__main__.py
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_exec setup.py test
|
%pytest
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
Loading…
Reference in New Issue
Block a user