0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

python3Packages.hypothesmith: 0.2.0 -> 0.2.3

This commit is contained in:
Martin Weinelt 2022-12-30 20:13:18 +01:00
parent 66abd79271
commit 7c337d6d8c
2 changed files with 17 additions and 13 deletions

View file

@ -11,11 +11,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "hypothesmith"; pname = "hypothesmith";
version = "0.2.0"; version = "0.2.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0fb7b3fd03d76eddd4474b0561e1c2662457593a74cc300fd27e5409cd4d7922"; sha256 = "sha256-vc6EXsmE5uP+0h5l0ugrjrxt5cpeuTZJ39dgNMWQakY=";
}; };
patches = [ patches = [
@ -46,6 +46,11 @@ buildPythonPackage rec {
"test_source_code_from_libcst_node_type" "test_source_code_from_libcst_node_type"
]; ];
disabledTestPaths = [
# missing blib2to3
"tests/test_syntactic.py"
];
pythonImportsCheck = [ "hypothesmith" ]; pythonImportsCheck = [ "hypothesmith" ];
meta = with lib; { meta = with lib; {

View file

@ -1,5 +1,5 @@
diff --git a/tests/test_cst.py b/tests/test_cst.py diff --git a/tests/test_cst.py b/tests/test_cst.py
index c436183..bdba2d7 100644 index 8532240..bdba2d7 100644
--- a/tests/test_cst.py --- a/tests/test_cst.py
+++ b/tests/test_cst.py +++ b/tests/test_cst.py
@@ -3,7 +3,6 @@ import ast @@ -3,7 +3,6 @@ import ast
@ -15,11 +15,11 @@ index c436183..bdba2d7 100644
-@pytest.mark.xfail -@pytest.mark.xfail
-@example("A\u2592", black.FileMode()) -@example("A\u2592", black.Mode())
-@given( -@given(
- source_code=hypothesmith.from_node(), - source_code=hypothesmith.from_node(),
- mode=st.builds( - mode=st.builds(
- black.FileMode, - black.Mode,
- line_length=st.just(88) | st.integers(0, 200), - line_length=st.just(88) | st.integers(0, 200),
- string_normalization=st.booleans(), - string_normalization=st.booleans(),
- is_pyi=st.booleans(), - is_pyi=st.booleans(),
@ -39,28 +39,27 @@ index c436183..bdba2d7 100644
def test_from_node_always_compilable(source_code): def test_from_node_always_compilable(source_code):
compile(source_code, "<string>", "exec") compile(source_code, "<string>", "exec")
diff --git a/tests/test_syntactic.py b/tests/test_syntactic.py diff --git a/tests/test_syntactic.py b/tests/test_syntactic.py
index 7ea42e9..a77ac39 100644 index 7fe9835..17c4f7c 100644
--- a/tests/test_syntactic.py --- a/tests/test_syntactic.py
+++ b/tests/test_syntactic.py +++ b/tests/test_syntactic.py
@@ -3,8 +3,6 @@ import ast @@ -3,7 +3,6 @@ import ast
import io import io
import tokenize import tokenize
-import black -import black
-import blib2to3 import blib2to3
import parso import parso
import pytest import pytest
from hypothesis import example, given, reject, strategies as st @@ -58,34 +57,6 @@ def test_ast_unparse_from_grammar(source_code):
@@ -58,34 +56,6 @@ def test_ast_unparse_from_grammar(source_code):
assert ast.dump(first) == ast.dump(second) assert ast.dump(first) == ast.dump(second)
-@example("\\", black.FileMode()) -@example("\\", black.Mode())
-@example("A#\r#", black.FileMode()) -@example("A#\r#", black.Mode())
-@given( -@given(
- source_code=hypothesmith.from_grammar(), - source_code=hypothesmith.from_grammar(),
- mode=st.builds( - mode=st.builds(
- black.FileMode, - black.Mode,
- line_length=st.just(88) | st.integers(0, 200), - line_length=st.just(88) | st.integers(0, 200),
- string_normalization=st.booleans(), - string_normalization=st.booleans(),
- is_pyi=st.booleans(), - is_pyi=st.booleans(),