repo
string
instance_id
string
base_commit
string
patch
string
test_patch
string
problem_statement
string
hints_text
string
created_at
string
version
string
FAIL_TO_PASS
string
PASS_TO_PASS
string
environment_setup_commit
string
difficulty
string
pylint-dev/pylint
pylint-dev__pylint-7080
3c5eca2ded3dd2b59ebaf23eb289453b5d2930f0
diff --git a/pylint/lint/expand_modules.py b/pylint/lint/expand_modules.py --- a/pylint/lint/expand_modules.py +++ b/pylint/lint/expand_modules.py @@ -52,6 +52,7 @@ def _is_ignored_file( ignore_list_re: list[Pattern[str]], ignore_list_paths_re: list[Pattern[str]], ) -> bool: + element = os.path.normpath(e...
diff --git a/tests/test_self.py b/tests/test_self.py --- a/tests/test_self.py +++ b/tests/test_self.py @@ -1330,6 +1330,27 @@ def test_recursive_current_dir(self): code=0, ) + def test_ignore_path_recursive_current_dir(self) -> None: + """Tests that path is normalized b...
`--recursive=y` ignores `ignore-paths` ### Bug description When running recursively, it seems `ignore-paths` in my settings in pyproject.toml is completely ignored ### Configuration ```ini [tool.pylint.MASTER] ignore-paths = [ # Auto generated "^src/gen/.*$", ] ``` ### Command used ```shell ...
@matusvalo Didn't you fix this recently? Or was this a case we overlooked? https://github.com/PyCQA/pylint/pull/6528. I will check I am not able to replicate the issue: ``` (pylint39) matusg@MacBook-Pro:~/dev/pylint/test$ cat src/gen/test.py import bla (pylint39) matusg@MacBook-Pro:~/dev/pylint/test$ pylint --...
2022-06-28T17:24:43Z
2.15
["tests/test_self.py::TestRunTC::test_ignore_path_recursive_current_dir"]
["tests/test_self.py::TestRunTC::test_pkginfo", "tests/test_self.py::TestRunTC::test_all", "tests/test_self.py::TestRunTC::test_no_ext_file", "tests/test_self.py::TestRunTC::test_w0704_ignored", "tests/test_self.py::TestRunTC::test_exit_zero", "tests/test_self.py::TestRunTC::test_nonexistent_config_file", "tests/test_s...
e90702074e68e20dc8e5df5013ee3ecf22139c3e
15 min - 1 hour
django/django
django__django-11734
999891bd80b3d02dd916731a7a239e1036174885
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -2332,10 +2332,6 @@ def get_db_prep_value(self, value, connection, prepared=False): value = connection.ops.validate_autopk_value(valu...
diff --git a/tests/queries/tests.py b/tests/queries/tests.py --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -6,7 +6,7 @@ from django.core.exceptions import EmptyResultSet, FieldError from django.db import DEFAULT_DB_ALIAS, connection -from django.db.models import Count, F, Q +from django.db.models imp...
OuterRef in exclude() or ~Q() uses wrong model. Description The following test (added to tests/queries/test_qs_combinators) fails when trying to exclude results using OuterRef() def test_exists_exclude(self): # filter() qs = Number.objects.annotate( foo=Exists( Item.objects.filter(tags__category_id=OuterRef('p...
Thanks for the report. ValueError was fixed in 35431298226165986ad07e91f9d3aca721ff38ec. Provided test fails on master with django.db.utils.ProgrammingError: missing FROM-clause entry for table "V0" LINE 1: ...(U1."tag_id" = U2."id") WHERE U2."category_id" = ("V0"."id")... It looks that OuterRef resolves to "V0"."id" i...
2019-09-01T18:46:50Z
3.0
["test_subquery_exclude_outerref (queries.tests.ExcludeTests)"]
["test_ticket8597 (queries.tests.ComparisonTests)", "#13227 -- If a queryset is already evaluated, it can still be used as a query arg", "test_no_fields_cloning (queries.tests.CloneTests)", "test_no_model_options_cloning (queries.tests.CloneTests)", "test_exists (queries.tests.ExistsSql)", "test_ticket_18414 (queries.t...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
astropy/astropy
astropy__astropy-14508
a3f4ae6cd24d5ecdf49f213d77b3513dd509a06c
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -1298,31 +1298,17 @@ def _format_value(value): def _format_float(value): - """Format a floating number to make sure it gets the decimal point.""" - value_str = f"{value:.16G}" - if...
diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py --- a/astropy/io/fits/tests/test_header.py +++ b/astropy/io/fits/tests/test_header.py @@ -137,6 +137,27 @@ def test_floating_point_value_card(self): ): assert str(c) == _pad("FLOATNUM= -4.6737463674763E+32") ...
`io.fits.Card` may use a string representation of floats that is larger than necessary ### Description In some scenarios, `io.fits.Card` may use a string representation of floats that is larger than necessary, which can force comments to be truncated. Due to this, there are some keyword/value/comment combinations that...
Agreed this is a bug. As far as I know, python floats by default now have reprs that use the right number of digits to be reproducible. So I think replacing this by `value_str = str(value)` should be totally fine. Do you want to try that and run the tests, to see if it works? If so, I think we should make that change ...
2023-03-09T11:08:51Z
5.1
["astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_floating_point_string_representation_card"]
["astropy/io/fits/tests/test_header.py::test_shallow_copy", "astropy/io/fits/tests/test_header.py::test_init_with_header", "astropy/io/fits/tests/test_header.py::test_init_with_dict", "astropy/io/fits/tests/test_header.py::test_init_with_ordereddict", "astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_ren...
5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5
15 min - 1 hour
scikit-learn/scikit-learn
scikit-learn__scikit-learn-26323
586f4318ffcdfbd9a1093f35ad43e81983740b66
diff --git a/sklearn/compose/_column_transformer.py b/sklearn/compose/_column_transformer.py --- a/sklearn/compose/_column_transformer.py +++ b/sklearn/compose/_column_transformer.py @@ -293,6 +293,7 @@ def set_output(self, *, transform=None): Estimator instance. """ super().set_output(tr...
diff --git a/sklearn/compose/tests/test_column_transformer.py b/sklearn/compose/tests/test_column_transformer.py --- a/sklearn/compose/tests/test_column_transformer.py +++ b/sklearn/compose/tests/test_column_transformer.py @@ -22,6 +22,7 @@ from sklearn.exceptions import NotFittedError from sklearn.preprocessing impo...
`ColumnTransformer.set_output` ignores the `remainder` if it's an estimator ### Describe the bug When using `set_output` on a `ColumnTransformer`, it sets the output to its sub-transformers but it ignores the transformer defined in `remainder`. This issue causes the following `if` to fail when gathering the resul...
2023-05-04T11:55:50Z
1.3
["sklearn/compose/tests/test_column_transformer.py::test_remainder_set_output"]
["sklearn/compose/tests/test_column_transformer.py::test_column_transformer", "sklearn/compose/tests/test_column_transformer.py::test_column_transformer_tuple_transformers_parameter", "sklearn/compose/tests/test_column_transformer.py::test_column_transformer_dataframe", "sklearn/compose/tests/test_column_transformer.py...
1e8a5b833d1b58f3ab84099c4582239af854b23a
15 min - 1 hour
django/django
django__django-14034
db1fc5cd3c5d36cdb5d0fe4404efd6623dd3e8fb
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py --- a/django/forms/boundfield.py +++ b/django/forms/boundfield.py @@ -2,7 +2,7 @@ from django.core.exceptions import ValidationError from django.forms.utils import flatatt, pretty_name -from django.forms.widgets import Textarea, TextInput +from dj...
diff --git a/tests/forms_tests/field_tests/test_multivaluefield.py b/tests/forms_tests/field_tests/test_multivaluefield.py --- a/tests/forms_tests/field_tests/test_multivaluefield.py +++ b/tests/forms_tests/field_tests/test_multivaluefield.py @@ -10,6 +10,20 @@ beatles = (('J', 'John'), ('P', 'Paul'), ('G', 'George'),...
MultiValueField ignores a required value of a sub field Description (last modified by Takayuki Hirai) A field and a form definition: from django.forms import ( Form, CharField, MultiValueField, MultiWidget, ) class MF(MultiValueField): widget = MultiWidget def __init__(self): fields = [ CharField(req...
Why do you pass required=False in super(MF, self).__init__()? Removing that seems to resolve the issue. I tried to remove required=False, then both INPUT elements in HTML became required. <tr><th><label for="id_mf_0">Mf:</label></th><td><input type="text" name="mf_0" required id="id_mf_0" /> <input type="text" name="mf...
2021-02-22T19:32:50Z
4.0
["test_render_required_attributes (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)"]
["test_bad_choice (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_clean (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_clean_disabled_multivalue (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_disabled_has_changed (forms_tests.field_tests...
475cffd1d64c690cdad16ede4d5e81985738ceb4
15 min - 1 hour
django/django
django__django-13741
d746f28949c009251a8741ba03d156964050717f
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py --- a/django/contrib/auth/forms.py +++ b/django/contrib/auth/forms.py @@ -56,16 +56,9 @@ class ReadOnlyPasswordHashField(forms.Field): def __init__(self, *args, **kwargs): kwargs.setdefault("required", False) + kwargs.setdef...
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py --- a/tests/auth_tests/test_forms.py +++ b/tests/auth_tests/test_forms.py @@ -1022,6 +1022,7 @@ def test_render(self): def test_readonly_field_has_changed(self): field = ReadOnlyPasswordHashField() + self.assertIs(field....
Set disabled prop on ReadOnlyPasswordHashField Description Currently the django.contrib.auth.forms.UserChangeForm defines a clean_password method that returns the initial password value to prevent (accidental) changes to the password value. It is also documented that custom forms for the User model need to define thi...
Sounds good. Would you like to provide a patch? Replying to Mariusz Felisiak: Sounds good. Would you like to provide a patch? I don't have the time to do a proper patch (with doc changes and additional tests). But I marked it as "Easy pickings" to entice others that are trying to get into contribution to Django ;-) I'd...
2020-12-02T10:52:52Z
3.2
["test_readonly_field_has_changed (auth_tests.test_forms.ReadOnlyPasswordHashTest)"]
["test_field_order (auth_tests.test_forms.PasswordChangeFormTest)", "test_html_autocomplete_attributes (auth_tests.test_forms.PasswordChangeFormTest)", "test_incorrect_password (auth_tests.test_forms.PasswordChangeFormTest)", "test_password_verification (auth_tests.test_forms.PasswordChangeFormTest)", "test_password_wh...
65dfb06a1ab56c238cc80f5e1c31f61210c4577d
<15 min fix
django/django
django__django-13417
71ae1ab0123582cc5bfe0f7d5f4cc19a9412f396
diff --git a/django/db/models/query.py b/django/db/models/query.py --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1224,7 +1224,12 @@ def ordered(self): return True if self.query.extra_order_by or self.query.order_by: return True - elif self.query.default_or...
diff --git a/tests/queries/tests.py b/tests/queries/tests.py --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -2084,6 +2084,16 @@ def test_annotated_ordering(self): self.assertIs(qs.ordered, False) self.assertIs(qs.order_by('num_notes').ordered, True) + def test_annotated_default_orde...
QuerySet.ordered property is incorrect for GROUP BY queries on models with Meta.ordering. Description Using the annotate function on a queryset doesn't keep the default ordering set in model's meta class. A property should say whether the queryset will be ordered or not. I wanted to use the qs.ordered property for th...
Thanks for this report, however QuerySet.ordered works for me, see ​tests. Replying to felixxm: Thanks for this report, however QuerySet.ordered works for me, see ​tests. Thanks for your answer but I've just checked again as it is in my example and ordered still returns True if an annotation is applied. As said earlier...
2020-09-14T07:49:15Z
3.2
["test_annotated_default_ordering (queries.tests.QuerysetOrderedTests)", "test_annotated_values_default_ordering (queries.tests.QuerysetOrderedTests)"]
["test_no_extra_params (queries.tests.DefaultValuesInsertTest)", "test_ticket14729 (queries.tests.RawQueriesTests)", "test_exists (queries.tests.ExistsSql)", "test_ticket_18414 (queries.tests.ExistsSql)", "test_ticket_24278 (queries.tests.TestTicket24279)", "test_ticket7371 (queries.tests.CustomPkTests)", "test_ticket_...
65dfb06a1ab56c238cc80f5e1c31f61210c4577d
<15 min fix
django/django
django__django-12125
89d41cba392b759732ba9f1db4ff29ed47da6a56
diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py --- a/django/db/migrations/serializer.py +++ b/django/db/migrations/serializer.py @@ -269,7 +269,7 @@ def serialize(self): if module == builtins.__name__: return self.value.__name__, set() els...
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -26,6 +26,11 @@ from .models import FoodManager, FoodQuerySet +class DeconstructibleInstances: + def deconstruct(self): + return ('DeconstructibleI...
makemigrations produces incorrect path for inner classes Description When you define a subclass from django.db.models.Field as an inner class of some other class, and use this field inside a django.db.models.Model class, then when you run manage.py makemigrations, a migrations file is created which refers to the inne...
This should be possible to do by relying on __qualname__ (instead of __name__) now that master is Python 3 only. ​PR I think we should focus on using __qualname__ during migration serialization as well instead of simply solving the field subclasses case. In fb0f987: Fixed #27914 -- Added support for nested classes in F...
2019-11-22T12:55:45Z
3.1
["test_serialize_nested_class (migrations.test_writer.WriterTests)", "test_serialize_numbers (migrations.test_writer.WriterTests)"]
["test_args_kwargs_signature (migrations.test_writer.OperationWriterTests)", "test_args_signature (migrations.test_writer.OperationWriterTests)", "test_empty_signature (migrations.test_writer.OperationWriterTests)", "test_expand_args_signature (migrations.test_writer.OperationWriterTests)", "test_kwargs_signature (migr...
0668164b4ac93a5be79f5b87fae83c657124d9ab
<15 min fix
scikit-learn/scikit-learn
scikit-learn__scikit-learn-25973
10dbc142bd17ccf7bd38eec2ac04b52ce0d1009e
diff --git a/sklearn/feature_selection/_sequential.py b/sklearn/feature_selection/_sequential.py --- a/sklearn/feature_selection/_sequential.py +++ b/sklearn/feature_selection/_sequential.py @@ -8,12 +8,12 @@ import warnings from ._base import SelectorMixin -from ..base import BaseEstimator, MetaEstimatorMixin, clo...
diff --git a/sklearn/feature_selection/tests/test_sequential.py b/sklearn/feature_selection/tests/test_sequential.py --- a/sklearn/feature_selection/tests/test_sequential.py +++ b/sklearn/feature_selection/tests/test_sequential.py @@ -6,11 +6,12 @@ from sklearn.preprocessing import StandardScaler from sklearn.pipelin...
Unable to pass splits to SequentialFeatureSelector ### Describe the bug This runs fine with e.g. `cv=5`, but according to the documentation, it should also be able to take an iterable of splits. However, passing splits from the cross validator fails Im fairly certain I have done similar things in the past to other...
The internal algorithm will use the `cv` parameter in a `for` loop. If `cv` is a generator, it will be consumed at the first iteration only. Later it trigger the error because we did not complete the other iteration of the `for` loop. Passing a list (e.g. `cv=list(splits)`) will solve the problem because we can reus...
2023-03-25T13:27:07Z
1.3
["sklearn/feature_selection/tests/test_sequential.py::test_cv_generator_support"]
["sklearn/feature_selection/tests/test_sequential.py::test_bad_n_features_to_select", "sklearn/feature_selection/tests/test_sequential.py::test_n_features_to_select[1-forward]", "sklearn/feature_selection/tests/test_sequential.py::test_n_features_to_select[1-backward]", "sklearn/feature_selection/tests/test_sequential....
1e8a5b833d1b58f3ab84099c4582239af854b23a
<15 min fix
django/django
django__django-11532
a5308514fb4bc5086c9a16a8a24a945eeebb073c
diff --git a/django/core/mail/message.py b/django/core/mail/message.py --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -16,7 +16,7 @@ from django.conf import settings from django.core.mail.utils import DNS_NAME -from django.utils.encoding import force_str +from django.utils.encoding import fo...
diff --git a/tests/mail/tests.py b/tests/mail/tests.py --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -14,10 +14,11 @@ from io import StringIO from smtplib import SMTP, SMTPAuthenticationError, SMTPException from ssl import SSLError +from unittest import mock from django.core import mail from django.core...
Email messages crash on non-ASCII domain when email encoding is non-unicode. Description When the computer hostname is set in unicode (in my case "正宗"), the following test fails: ​https://github.com/django/django/blob/master/tests/mail/tests.py#L368 Specifically, since the encoding is set to iso-8859-1, Python attemp...
Thanks for the report. Simple encoding should fix this issue, e.g. diff --git a/django/core/mail/utils.py b/django/core/mail/utils.py index d18dfe4667..68f9e464d6 100644 --- a/django/core/mail/utils.py +++ b/django/core/mail/utils.py @@ -14,6 +14,10 @@ class CachedDnsName: def get_fqdn(self): if not hasattr(self, '_fqd...
2019-07-02T10:29:28Z
3.0
["test_non_ascii_dns_non_unicode_email (mail.tests.MailTests)"]
["test_7bit (mail.tests.PythonGlobalState)", "test_8bit_latin (mail.tests.PythonGlobalState)", "test_8bit_non_latin (mail.tests.PythonGlobalState)", "test_utf8 (mail.tests.PythonGlobalState)", "test_date_header_localtime (mail.tests.MailTimeZoneTests)", "test_date_header_utc (mail.tests.MailTimeZoneTests)", "test_close...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
pytest-dev/pytest
pytest-dev__pytest-7571
422685d0bdc110547535036c1ff398b5e1c44145
diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -345,6 +345,7 @@ def __init__(self, item: nodes.Node) -> None: """Creates a new funcarg.""" self._item = item # dict of log name -> log level + self._initial_handle...
diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -2,6 +2,7 @@ import pytest from _pytest.logging import caplog_records_key +from _pytest.pytester import Testdir logger = logging.getLogger(__name__) sublo...
caplog fixture doesn't restore log level after test From the documentation at https://docs.pytest.org/en/6.0.0/logging.html#caplog-fixture, "The log levels set are restored automatically at the end of the test". It used to work, but looks broken in new 6.0 release. Minimal example to reproduce: ``` def test_foo(ca...
This probably regressed in fcbaab8b0b89abc622dbfb7982cf9bd8c91ef301. I will take a look.
2020-07-29T12:00:47Z
6.0
["testing/logging/test_fixture.py::test_change_level_undos_handler_level"]
["testing/logging/test_fixture.py::test_change_level", "testing/logging/test_fixture.py::test_with_statement", "testing/logging/test_fixture.py::test_log_access", "testing/logging/test_fixture.py::test_messages", "testing/logging/test_fixture.py::test_record_tuples", "testing/logging/test_fixture.py::test_unicode", "te...
634cde9506eb1f48dec3ec77974ee8dc952207c6
15 min - 1 hour
sympy/sympy
sympy__sympy-16766
b8fe457a02cc24b3470ff678d0099c350b7fef43
diff --git a/sympy/printing/pycode.py b/sympy/printing/pycode.py --- a/sympy/printing/pycode.py +++ b/sympy/printing/pycode.py @@ -357,6 +357,11 @@ def _print_Not(self, expr): PREC = precedence(expr) return self._operators['not'] + self.parenthesize(expr.args[0], PREC) + def _print_Indexed(self, ...
diff --git a/sympy/printing/tests/test_pycode.py b/sympy/printing/tests/test_pycode.py --- a/sympy/printing/tests/test_pycode.py +++ b/sympy/printing/tests/test_pycode.py @@ -12,9 +12,10 @@ MpmathPrinter, NumPyPrinter, PythonCodePrinter, pycode, SciPyPrinter ) from sympy.utilities.pytest import raises +from symp...
PythonCodePrinter doesn't support Indexed I use `lambdify()` to generate some functions and save the code for further use. But the generated code for `Indexed` operation has some warnings which can be confirmed by following code; ``` from sympy import * p = IndexedBase("p") pycode(p[0]) ``` the output is ...
2019-05-01T22:02:17Z
1.5
["test_PythonCodePrinter"]
["test_MpmathPrinter", "test_NumPyPrinter", "test_SciPyPrinter", "test_pycode_reserved_words", "test_printmethod", "test_codegen_ast_nodes", "test_issue_14283"]
70381f282f2d9d039da860e391fe51649df2779d
<15 min fix
matplotlib/matplotlib
matplotlib__matplotlib-25479
7fdf772201e4c9bafbc16dfac23b5472d6a53fa2
diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -146,6 +146,11 @@ def register(self, cmap, *, name=None, force=False): "that was already in the registry.") self._cmaps[name] = cmap.copy() + # Someone may ...
diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py --- a/lib/matplotlib/tests/test_colors.py +++ b/lib/matplotlib/tests/test_colors.py @@ -195,10 +195,10 @@ def test_colormap_equals(): # Make sure we can compare different sizes without failure cm_copy._lut = cm_copy._lut[:1...
Confusing (broken?) colormap name handling Consider the following example in which one creates and registers a new colormap and attempt to use it with the `pyplot` interface. ``` python from matplotlib import cm from matplotlib.colors import LinearSegmentedColormap import matplotlib.pyplot as plt import matplotlib mat...
Seems like the issue is coming up in the `set_cmap` function: https://github.com/matplotlib/matplotlib/blob/bb75f737a28f620fe023742f59dc6ed4f53b094f/lib/matplotlib/pyplot.py#L2072-L2078 The name you pass to that function is only used to grab the colormap, but this doesn't account for the fact that in the internal list...
2023-03-16T17:59:41Z
3.7
["lib/matplotlib/tests/test_colors.py::test_colormap_equals", "lib/matplotlib/tests/test_colors.py::test_set_cmap_mismatched_name"]
["lib/matplotlib/tests/test_colors.py::test_create_lookup_table[5-result0]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[2-result1]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[1-result2]", "lib/matplotlib/tests/test_colors.py::test_index_dtype[uint8]", "lib/matplotlib/tests/test_...
0849036fd992a2dd133a0cffc3f84f58ccf1840f
<15 min fix
django/django
django__django-11292
eb16c7260e573ec513d84cb586d96bdf508f3173
diff --git a/django/core/management/base.py b/django/core/management/base.py --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -95,7 +95,7 @@ class DjangoHelpFormatter(HelpFormatter): """ show_last = { '--version', '--verbosity', '--traceback', '--settings', '--pythonpath',...
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -253,6 +253,16 @@ def test_disallowed_abbreviated_options(self): self.assertNoOutput(err) self.assertEqual(out.strip(), 'Set foo') + def test_skip_chec...
Add --skip-checks option to management commands. Description Management commands already have skip_checks stealth option. I propose exposing this option on the command line. This would allow users to skip checks when running a command from the command line. Sometimes in a development environment, it is nice to move a...
2019-04-27T14:23:07Z
3.0
["test_skip_checks (user_commands.tests.CommandRunTests)"]
["test_get_random_secret_key (user_commands.tests.UtilsTests)", "test_is_ignored_path_false (user_commands.tests.UtilsTests)", "test_is_ignored_path_true (user_commands.tests.UtilsTests)", "test_no_existent_external_program (user_commands.tests.UtilsTests)", "test_normalize_path_patterns_truncates_wildcard_base (user_c...
419a78300f7cd27611196e1e464d50fd0385ff27
15 min - 1 hour
pydata/xarray
pydata__xarray-3677
ef6e6a7b86f8479b9a1fecf15ad5b88a2326b31e
diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -3604,6 +3604,7 @@ def merge( If any variables conflict (see ``compat``). """ _check_inplace(inplace) + other = other.to_dataset() if isinstance(other, xr.DataA...
diff --git a/xarray/tests/test_merge.py b/xarray/tests/test_merge.py --- a/xarray/tests/test_merge.py +++ b/xarray/tests/test_merge.py @@ -3,6 +3,7 @@ import xarray as xr from xarray.core import dtypes, merge +from xarray.testing import assert_identical from . import raises_regex from .test_dataset import creat...
Merging dataArray into dataset using dataset method fails While it's possible to merge a dataset and a dataarray object using the top-level `merge()` function, if you try the same thing with the `ds.merge()` method it fails. ```python import xarray as xr ds = xr.Dataset({'a': 0}) da = xr.DataArray(1, name='b') ...
2020-01-09T16:07:14Z
0.12
["xarray/tests/test_merge.py::TestMergeMethod::test_merge_dataarray"]
["xarray/tests/test_merge.py::TestMergeInternals::test_broadcast_dimension_size", "xarray/tests/test_merge.py::TestMergeFunction::test_merge_arrays", "xarray/tests/test_merge.py::TestMergeFunction::test_merge_datasets", "xarray/tests/test_merge.py::TestMergeFunction::test_merge_dataarray_unnamed", "xarray/tests/test_me...
1c198a191127c601d091213c4b3292a8bb3054e1
15 min - 1 hour
django/django
django__django-16100
c6350d594c359151ee17b0c4f354bb44f28ff69e
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -2011,15 +2011,17 @@ def changelist_view(self, request, extra_context=None): ) if formset.is_valid(): changecount = 0 -...
diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py --- a/tests/admin_changelist/tests.py +++ b/tests/admin_changelist/tests.py @@ -1,4 +1,5 @@ import datetime +from unittest import mock from django.contrib import admin from django.contrib.admin.models import LogEntry @@ -16,12 +17,12 @@...
Add transaction handling to Changelist list_editable processing. Description It seems that changelist_view in Django admin is missing a transaction. Since the view may change data in database, it should be wrapped in a transaction to prevent unexpected states in case of errors.
So, this has never been wrapped in a transaction. See ​https://github.com/django/django/commit/7bc0878922 where it was added. Happy to accept as a New Feature to investigate adding that. (I can't immediately see any obvious blockers.)
2022-09-24T13:32:02Z
4.2
["test_list_editable_atomicity (admin_changelist.tests.ChangeListTests)"]
["{% get_admin_log %} works if the user model's primary key isn't named", "test_missing_args (admin_changelist.tests.GetAdminLogTests)", "{% get_admin_log %} works without specifying a user.", "test_non_integer_limit (admin_changelist.tests.GetAdminLogTests)", "test_without_as (admin_changelist.tests.GetAdminLogTests)"...
0fbdb9784da915fce5dcc1fe82bac9b4785749e5
<15 min fix
astropy/astropy
astropy__astropy-7166
26d147868f8a891a6009a25cd6a8576d2e1bd747
diff --git a/astropy/utils/misc.py b/astropy/utils/misc.py --- a/astropy/utils/misc.py +++ b/astropy/utils/misc.py @@ -4,9 +4,6 @@ A "grab bag" of relatively small general-purpose utilities that don't have a clear module/package to live in. """ - - - import abc import contextlib import difflib @@ -27,7 +24,6 @@ ...
diff --git a/astropy/utils/tests/test_misc.py b/astropy/utils/tests/test_misc.py --- a/astropy/utils/tests/test_misc.py +++ b/astropy/utils/tests/test_misc.py @@ -80,14 +80,26 @@ def __call__(self, *args): "FOO" pass + @property + def bar(self): + "BAR" + ...
InheritDocstrings metaclass doesn't work for properties Inside the InheritDocstrings metaclass it uses `inspect.isfunction` which returns `False` for properties.
This was as implemented back in #2159. I don't see any `inspect.isproperty`. Do you have any suggestions? I guess it should work with [inspect.isdatadescriptor](https://docs.python.org/3/library/inspect.html#inspect.isdatadescriptor). And I wonder if this class is still needed, it seems that it started with #2136 for...
2018-02-07T15:05:31Z
1.3
["astropy/utils/tests/test_misc.py::test_inherit_docstrings"]
["astropy/utils/tests/test_misc.py::test_isiterable", "astropy/utils/tests/test_misc.py::test_signal_number_to_name_no_failure", "astropy/utils/tests/test_misc.py::test_skip_hidden", "astropy/utils/tests/test_misc.py::test_JsonCustomEncoder", "astropy/utils/tests/test_misc.py::test_check_broadcast", "astropy/utils/test...
848c8fa21332abd66b44efe3cb48b72377fb32cc
<15 min fix
astropy/astropy
astropy__astropy-14995
b16c7d12ccbc7b2d20364b89fb44285bcbfede54
diff --git a/astropy/nddata/mixins/ndarithmetic.py b/astropy/nddata/mixins/ndarithmetic.py --- a/astropy/nddata/mixins/ndarithmetic.py +++ b/astropy/nddata/mixins/ndarithmetic.py @@ -520,10 +520,10 @@ def _arithmetic_mask(self, operation, operand, handle_mask, axis=None, **kwds): elif self.mask is None and ope...
diff --git a/astropy/nddata/mixins/tests/test_ndarithmetic.py b/astropy/nddata/mixins/tests/test_ndarithmetic.py --- a/astropy/nddata/mixins/tests/test_ndarithmetic.py +++ b/astropy/nddata/mixins/tests/test_ndarithmetic.py @@ -1310,3 +1310,42 @@ def test_raise_method_not_supported(): # raise error for unsupported ...
In v5.3, NDDataRef mask propagation fails when one of the operand does not have a mask ### Description This applies to v5.3. It looks like when one of the operand does not have a mask, the mask propagation when doing arithmetic, in particular with `handle_mask=np.bitwise_or` fails. This is not a problem in v5.2. ...
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta...
2023-06-27T19:48:18Z
5.2
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_nddata_bitmask_arithmetic"]
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data10-data20]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data11-data21]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data12-data22]", "astropy/nddata/mixins/tests/test_ndarithmetic.py...
362f6df12abf9bd769d4915fabf955c993ea22cf
<15 min fix
django/django
django__django-11400
1f8382d34d54061eddc41df6994e20ee38c60907
diff --git a/django/contrib/admin/filters.py b/django/contrib/admin/filters.py --- a/django/contrib/admin/filters.py +++ b/django/contrib/admin/filters.py @@ -193,11 +193,17 @@ def has_output(self): def expected_parameters(self): return [self.lookup_kwarg, self.lookup_kwarg_isnull] - def field_choice...
diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py --- a/tests/admin_filters/tests.py +++ b/tests/admin_filters/tests.py @@ -591,6 +591,22 @@ class BookAdmin(ModelAdmin): expected = [(self.john.pk, 'John Blue'), (self.jack.pk, 'Jack Red')] self.assertEqual(filterspec.lookup_choic...
Ordering problem in admin.RelatedFieldListFilter and admin.RelatedOnlyFieldListFilter Description RelatedFieldListFilter doesn't fall back to the ordering defined in Model._meta.ordering. Ordering gets set to an empty tuple in ​https://github.com/django/django/blob/2.2.1/django/contrib/admin/filters.py#L196 and unle...
Sample project illustrating the problem. Navigate to /admin/foo/book and observer the order of Author in the list filters. Screenshot of RelatedOnlyFieldListFilter not ordering items. OK, yes, seems a reasonable suggestion if you'd like to work on it. Hello. We've updated our django recently and faced this bug. For me ...
2019-05-22T11:30:39Z
3.0
["test_get_choices_default_ordering (model_fields.tests.GetChoicesOrderingTests)", "test_get_choices_reverse_related_field_default_ordering (model_fields.tests.GetChoicesOrderingTests)", "RelatedFieldListFilter ordering respects Model.ordering.", "test_relatedfieldlistfilter_reverse_relationships_default_ordering (admi...
["test_choices_and_field_display (model_fields.tests.GetFieldDisplayTests)", "test_empty_iterator_choices (model_fields.tests.GetFieldDisplayTests)", "A translated display value is coerced to str.", "test_iterator_choices (model_fields.tests.GetFieldDisplayTests)", "test_check (model_fields.tests.ChoicesTests)", "test_...
419a78300f7cd27611196e1e464d50fd0385ff27
1-4 hours
django/django
django__django-13401
453967477e3ddae704cd739eac2449c0e13d464c
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -516,17 +516,37 @@ def clone(self): def __eq__(self, other): # Needed for @total_ordering if isinstance(other, Field): - ...
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -102,6 +102,36 @@ def test_deconstruct_nested_field(self): name, path, args, kwargs = Nested.Field().deconstruct() self.assertEqual(path, 'model_fields.tests.Ne...
Abstract model field should not be equal across models Description Consider the following models: class A(models.Model): class Meta: abstract = True myfield = IntegerField() class B(A): pass class C(A): pass If I pull the fields of B and C into a shared set, one will be de-duplicated away, because they compare ...
2020-09-09T11:19:00Z
3.2
["Field instances from abstract models are not equal."]
["test_blank_in_choices (model_fields.tests.GetChoicesTests)", "test_blank_in_grouped_choices (model_fields.tests.GetChoicesTests)", "test_empty_choices (model_fields.tests.GetChoicesTests)", "test_lazy_strings_not_evaluated (model_fields.tests.GetChoicesTests)", "test_get_choices (model_fields.tests.GetChoicesLimitCho...
65dfb06a1ab56c238cc80f5e1c31f61210c4577d
15 min - 1 hour
django/django
django__django-13551
7f9e4524d6b23424cf44fbe1bf1f4e70f6bb066e
diff --git a/django/contrib/auth/tokens.py b/django/contrib/auth/tokens.py --- a/django/contrib/auth/tokens.py +++ b/django/contrib/auth/tokens.py @@ -78,9 +78,9 @@ def _make_token_with_timestamp(self, user, timestamp, legacy=False): def _make_hash_value(self, user, timestamp): """ - Hash the use...
diff --git a/tests/auth_tests/models/__init__.py b/tests/auth_tests/models/__init__.py --- a/tests/auth_tests/models/__init__.py +++ b/tests/auth_tests/models/__init__.py @@ -8,6 +8,7 @@ from .no_password import NoPasswordUser from .proxy import Proxy, UserProxy from .uuid_pk import UUIDUser +from .with_custom_email...
Changing user's email could invalidate password reset tokens Description Sequence: Have account with email address foo@… Password reset request for that email (unused) foo@… account changes their email address Password reset email is used The password reset email's token should be rejected at that point, but in fact ...
2020-10-17T17:22:01Z
3.2
["Updating the user email address invalidates the token.", "test_token_with_different_secret (auth_tests.test_tokens.TokenGeneratorTest)"]
["test_str (auth_tests.test_models.GroupTests)", "test_group_natural_key (auth_tests.test_models.NaturalKeysTestCase)", "test_user_natural_key (auth_tests.test_models.NaturalKeysTestCase)", "test_check_password (auth_tests.test_models.AnonymousUserTests)", "test_delete (auth_tests.test_models.AnonymousUserTests)", "tes...
65dfb06a1ab56c238cc80f5e1c31f61210c4577d
<15 min fix
matplotlib/matplotlib
matplotlib__matplotlib-20859
64619e53e9d0ed417daba287ac0d3a06943a54d5
diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -360,7 +360,7 @@ def __init__( """ # local import only to avoid circularity from matplotlib.axes import Axes - from matplotlib.figure import Figure + ...
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -871,3 +871,12 @@ def test_handlerline2d(): handles = [mlines.Line2D([0], [0], marker="v")] leg = ax.legend(handles, ["Aardvark"], numpo...
Adding a legend to a `SubFigure` doesn't work <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** <!--A short 1-2 sentences that succinctly describes the bug...
Yep that was just an oversight, not a design decision ;-) I don't want to complicate this too much, but a further issue arrises even after changing the line I suggest above (let me know if this should be a separate issue) ```python fig = plt.figure() subfig = fig.subfigures() ax = subfig.subplots() ax.plot([0, 1...
2021-08-19T09:03:04Z
3.4
["lib/matplotlib/tests/test_legend.py::test_subfigure_legend"]
["lib/matplotlib/tests/test_legend.py::test_legend_ordereddict", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[pdf]", "li...
f93c0a3dcb82feed0262d758626c90d4002685f3
<15 min fix
pydata/xarray
pydata__xarray-4687
d3b6aa6d8b997df115a53c001d00222a0f92f63a
diff --git a/xarray/core/computation.py b/xarray/core/computation.py --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -1727,7 +1727,7 @@ def dot(*arrays, dims=None, **kwargs): return result.transpose(*all_dims, missing_dims="ignore") -def where(cond, x, y): +def where(cond, x, y, keep_attrs...
diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -1922,6 +1922,15 @@ def test_where() -> None: assert_identical(expected, actual) +def test_where_attrs() -> None: + cond = xr.DataArray([True, Fal...
xr.where not preserving attributes <!-- Please include a self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report: - Craft Minimal Bug Reports: http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-...
this also came up in #4141, where we proposed to work around this by using `DataArray.where` (as far as I can tell this doesn't work for you, though). There are two issues here: first of all, by default `DataArray.__eq__` removes the attributes, so without calling `xr.set_options(keep_attrs=True)` `data == 1` won't ...
2020-12-13T20:42:40Z
0.12
["xarray/tests/test_computation.py::test_where_attrs"]
["xarray/tests/test_computation.py::test_signature_properties", "xarray/tests/test_computation.py::test_result_name", "xarray/tests/test_computation.py::test_ordered_set_union", "xarray/tests/test_computation.py::test_ordered_set_intersection", "xarray/tests/test_computation.py::test_join_dict_keys", "xarray/tests/test...
1c198a191127c601d091213c4b3292a8bb3054e1
15 min - 1 hour
astropy/astropy
astropy__astropy-14539
c0a24c1dc957a3b565294213f435fefb2ec99714
diff --git a/astropy/io/fits/diff.py b/astropy/io/fits/diff.py --- a/astropy/io/fits/diff.py +++ b/astropy/io/fits/diff.py @@ -1449,7 +1449,7 @@ def _diff(self): arrb.dtype, np.floating ): diffs = where_not_allclose(arra, arrb, rtol=self.rtol, atol=self.atol) - ...
diff --git a/astropy/io/fits/tests/test_diff.py b/astropy/io/fits/tests/test_diff.py --- a/astropy/io/fits/tests/test_diff.py +++ b/astropy/io/fits/tests/test_diff.py @@ -406,16 +406,17 @@ def test_identical_tables(self): c8 = Column("H", format="C", array=[0.0 + 1.0j, 2.0 + 3.0j]) c9 = Column("I", fo...
`io.fits.FITSDiff` may sometimes report differences between identical files ### Description In some scenarios, `io.fits.FITSDiff` may report differences between identical files, even when comparing the same file to itself. This may be caused by improper handling of VLAs (variable-length arrays). ### Expected behavior...
Seems due to the use of `Q`, only `P` is handled in the diff code. This: ``` --- astropy/io/fits/diff.py +++ astropy/io/fits/diff.py @@ -1449,7 +1449,7 @@ class TableDataDiff(_BaseDiff): arrb.dtype, np.floating ): diffs = where_not_allclose(arra, arrb, rtol=self.rto...
2023-03-16T18:45:19Z
5.1
["astropy/io/fits/tests/test_diff.py::TestDiff::test_identical_tables", "astropy/io/fits/tests/test_diff.py::TestDiff::test_different_table_data"]
["astropy/io/fits/tests/test_diff.py::TestDiff::test_identical_headers", "astropy/io/fits/tests/test_diff.py::TestDiff::test_slightly_different_headers", "astropy/io/fits/tests/test_diff.py::TestDiff::test_common_keywords", "astropy/io/fits/tests/test_diff.py::TestDiff::test_different_keyword_count", "astropy/io/fits/t...
5f74eacbcc7fff707a44d8eb58adaa514cb7dcb5
15 min - 1 hour
mwaskom/seaborn
mwaskom__seaborn-3069
54cab15bdacfaa05a88fbc5502a5b322d99f148e
diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py --- a/seaborn/_core/plot.py +++ b/seaborn/_core/plot.py @@ -25,7 +25,7 @@ from seaborn._stats.base import Stat from seaborn._core.data import PlotData from seaborn._core.moves import Move -from seaborn._core.scales import Scale +from seaborn._core.scales imp...
diff --git a/tests/_core/test_plot.py b/tests/_core/test_plot.py --- a/tests/_core/test_plot.py +++ b/tests/_core/test_plot.py @@ -645,6 +645,28 @@ def test_undefined_variable_raises(self): with pytest.raises(RuntimeError, match=err): p.plot() + def test_nominal_x_axis_tweaks(self): + + ...
Nominal scale should be drawn the same way as categorical scales Three distinctive things happen on the categorical axis in seaborn's categorical plots: 1. The scale is drawn to +/- 0.5 from the first and last tick, rather than using the normal margin logic 2. A grid is not shown, even when it otherwise would be wi...
2022-10-09T23:31:20Z
0.12
["tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks", "tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks"]
["tests/_core/test_plot.py::TestInit::test_empty", "tests/_core/test_plot.py::TestInit::test_data_only", "tests/_core/test_plot.py::TestInit::test_df_and_named_variables", "tests/_core/test_plot.py::TestInit::test_df_and_mixed_variables", "tests/_core/test_plot.py::TestInit::test_vector_variables_only", "tests/_core/te...
d25872b0fc99dbf7e666a91f59bd4ed125186aa1
15 min - 1 hour
django/django
django__django-13158
7af8f4127397279d19ef7c7899e93018274e2f9b
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -305,6 +305,7 @@ def clone(self): obj.annotation_select_mask = None else: obj.annotation_select_mask = self.annotation_select_mask.copy...
diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py --- a/tests/queries/test_qs_combinators.py +++ b/tests/queries/test_qs_combinators.py @@ -51,6 +51,13 @@ def test_union_distinct(self): self.assertEqual(len(list(qs1.union(qs2, all=True))), 20) self.assertEqual(le...
QuerySet.none() on combined queries returns all results. Description I came across this issue on Stack Overflow. I'm not 100% sure it's a bug, but it does seem strange. With this code (excuse the bizarre example filtering): class Publication(models.Model): pass class Article(models.Model): publications = models.Man...
Thanks for the report. QuerySet.none() doesn't work properly on combined querysets, it returns all results instead of an empty queryset.
2020-07-06T19:18:11Z
3.2
["test_union_none (queries.test_qs_combinators.QuerySetSetOperationTests)"]
["test_combining_multiple_models (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_difference (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_intersection (queries.test_qs_combinators.QuerySetSetOperationTests)", "test_count_union (queries.test_qs_combinators.QuerySetSetOperati...
65dfb06a1ab56c238cc80f5e1c31f61210c4577d
15 min - 1 hour
scikit-learn/scikit-learn
scikit-learn__scikit-learn-14141
3d997697fdd166eff428ea9fd35734b6a8ba113e
diff --git a/sklearn/utils/_show_versions.py b/sklearn/utils/_show_versions.py --- a/sklearn/utils/_show_versions.py +++ b/sklearn/utils/_show_versions.py @@ -48,6 +48,7 @@ def _get_deps_info(): "Cython", "pandas", "matplotlib", + "joblib", ] def get_version(module):
diff --git a/sklearn/utils/tests/test_show_versions.py b/sklearn/utils/tests/test_show_versions.py --- a/sklearn/utils/tests/test_show_versions.py +++ b/sklearn/utils/tests/test_show_versions.py @@ -23,6 +23,7 @@ def test_get_deps_info(): assert 'Cython' in deps_info assert 'pandas' in deps_info assert '...
Add joblib in show_versions joblib should be added to the dependencies listed in show_versions or added to the issue template when sklearn version is > 0.20.
2019-06-21T20:53:37Z
0.22
["sklearn/utils/tests/test_show_versions.py::test_get_deps_info"]
["sklearn/utils/tests/test_show_versions.py::test_get_sys_info", "sklearn/utils/tests/test_show_versions.py::test_show_versions_with_blas"]
7e85a6d1f038bbb932b36f18d75df6be937ed00d
<15 min fix
pytest-dev/pytest
pytest-dev__pytest-10356
3c1534944cbd34e8a41bc9e76818018fadefc9a1
diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py --- a/src/_pytest/mark/structures.py +++ b/src/_pytest/mark/structures.py @@ -355,12 +355,35 @@ def __call__(self, *args: object, **kwargs: object): return self.with_args(*args, **kwargs) -def get_unpacked_marks(obj: object) -> It...
diff --git a/testing/test_mark.py b/testing/test_mark.py --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -1109,3 +1109,27 @@ def test_foo(): result = pytester.runpytest(foo, "-m", expr) result.stderr.fnmatch_lines([expected]) assert result.ret == ExitCode.USAGE_ERROR + + +def test_mark_mro() -> ...
Consider MRO when obtaining marks for classes When using pytest markers in two baseclasses `Foo` and `Bar`, inheriting from both of those baseclasses will lose the markers of one of those classes. This behavior is present in pytest 3-6, and I think it may as well have been intended. I am still filing it as a bug becaus...
ronny has already refactored this multiple times iirc, but I wonder if it would make sense to store markers as `pytestmark_foo` and `pytestmark_bar` on the class instead of in one `pytestmark` array, that way you can leverage regular inheritance rules Thanks for bringing this to attention, pytest show walk the mro of a...
2022-10-08T06:20:42Z
7.2
["testing/test_mark.py::test_mark_mro"]
["testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[mark]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[param]", "testing/test_mark.py::TestMark::test_pytest_mark_notcallable", "testing/test_mark.py::TestMark::test_mark_with_param", "testing/test_mark.py::TestMark::test_pytest...
572b5657d7ca557593418ce0319fabff88800c73
1-4 hours
scikit-learn/scikit-learn
scikit-learn__scikit-learn-13142
1c8668b0a021832386470ddf740d834e02c66f69
diff --git a/sklearn/mixture/base.py b/sklearn/mixture/base.py --- a/sklearn/mixture/base.py +++ b/sklearn/mixture/base.py @@ -257,11 +257,6 @@ def fit_predict(self, X, y=None): best_params = self._get_parameters() best_n_iter = n_iter - # Always do a final e-step to guarantee...
diff --git a/sklearn/mixture/tests/test_bayesian_mixture.py b/sklearn/mixture/tests/test_bayesian_mixture.py --- a/sklearn/mixture/tests/test_bayesian_mixture.py +++ b/sklearn/mixture/tests/test_bayesian_mixture.py @@ -451,6 +451,15 @@ def test_bayesian_mixture_fit_predict(seed, max_iter, tol): assert_array_eq...
GaussianMixture predict and fit_predict disagree when n_init>1 #### Description When `n_init` is specified in GaussianMixture, the results of fit_predict(X) and predict(X) are often different. The `test_gaussian_mixture_fit_predict` unit test doesn't catch this because it does not set `n_init`. #### Steps/Code to ...
Indeed the code in fit_predict and the one in predict are not exactly consistent. This should be fixed but we would need to check the math to choose the correct variant, add a test and remove the other one. I don't think the math is wrong or inconsistent. I think it's a matter of `fit_predict` returning the fit from t...
2019-02-12T14:32:37Z
0.21
["sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_fit_predict_n_init", "sklearn/mixture/tests/test_gaussian_mixture.py::test_gaussian_mixture_fit_predict_n_init"]
["sklearn/mixture/tests/test_bayesian_mixture.py::test_log_dirichlet_norm", "sklearn/mixture/tests/test_bayesian_mixture.py::test_log_wishart_norm", "sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_covariance_type", "sklearn/mixture/tests/test_bayesian_mixture.py::test_bayesian_mixture_weight_conc...
7813f7efb5b2012412888b69e73d76f2df2b50b6
<15 min fix
django/django
django__django-16032
0c3981eb5094419fe200eb46c71b5376a2266166
diff --git a/django/db/models/fields/related_lookups.py b/django/db/models/fields/related_lookups.py --- a/django/db/models/fields/related_lookups.py +++ b/django/db/models/fields/related_lookups.py @@ -93,7 +93,6 @@ def get_prep_lookup(self): elif not getattr(self.rhs, "has_select_fields", True) and not g...
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py --- a/tests/annotations/tests.py +++ b/tests/annotations/tests.py @@ -989,6 +989,34 @@ def test_annotation_filter_with_subquery(self): publisher_books_qs, [{"name": "Sams"}, {"name": "Morgan Kaufmann"}] ) + def test_annotati...
__in doesn't clear selected fields on the RHS when QuerySet.alias() is used after annotate(). Description Here is a test case to reproduce the bug, you can add this in tests/annotations/tests.py def test_annotation_and_alias_filter_in_subquery(self): long_books_qs = ( Book.objects.filter( pages__gt=400, ...
This is a ​documented and expected behavior. Using either .alias or .annotate works as expected without using .values to limit to 1 column. Why is that? but using both of them doesn't seem work. Replying to Gabriel Muj: Using either .alias or .annotate works as expected without using .values to limit to 1 column. Why i...
2022-09-06T09:54:57Z
4.2
["test_annotation_and_alias_filter_in_subquery (annotations.tests.NonAggregateAnnotationTestCase)", "test_annotation_and_alias_filter_related_in_subquery (annotations.tests.NonAggregateAnnotationTestCase)"]
["test_aggregate_alias (annotations.tests.AliasTests)", "test_alias_after_annotation (annotations.tests.AliasTests)", "test_alias_annotate_with_aggregation (annotations.tests.AliasTests)", "test_alias_annotation_expression (annotations.tests.AliasTests)", "test_alias_default_alias_expression (annotations.tests.AliasTes...
0fbdb9784da915fce5dcc1fe82bac9b4785749e5
15 min - 1 hour