forked from mirrors/nixpkgs
python3Packages.black: 20.8b1 -> 21.5b1
- Avoid excluding files during tests by setting a project root. - Enable some previously disabled tests.
This commit is contained in:
parent
58240d3c21
commit
0e7ee4d6a0
|
@ -8,6 +8,7 @@
|
|||
, dataclasses
|
||||
, mypy-extensions
|
||||
, pathspec
|
||||
, parameterized
|
||||
, regex
|
||||
, toml
|
||||
, typed-ast
|
||||
|
@ -15,13 +16,13 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "black";
|
||||
version = "20.8b1";
|
||||
version = "21.5b1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw";
|
||||
sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
|
@ -30,19 +31,19 @@ buildPythonPackage rec {
|
|||
# Black starts a local server and needs to bind a local address.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
checkInputs = [ pytestCheckHook parameterized ];
|
||||
|
||||
preCheck = ''
|
||||
export PATH="$PATH:$out/bin"
|
||||
|
||||
# The top directory /build matches black's DEFAULT_EXCLUDE regex.
|
||||
# Make /build the project root for black tests to avoid excluding files.
|
||||
touch ../.git
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Don't know why these tests fails
|
||||
"test_cache_multiple_files"
|
||||
"test_failed_formatting_does_not_get_cached"
|
||||
# requires network access
|
||||
"test_gen_check_output"
|
||||
"test_process_queue"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# fails on darwin
|
||||
"test_expression_diff"
|
||||
|
|
Loading…
Reference in a new issue