2021-06-28 23:13:55 +00:00
{ lib , stdenv , buildPythonPackage , fetchPypi
, itsdangerous , hypothesis
, pytestCheckHook , requests
, pytest-timeout
} :
buildPythonPackage rec {
pname = " W e r k z e u g " ;
version = " 1 . 0 . 1 " ;
src = fetchPypi {
inherit pname version ;
sha256 = " 6 c 8 0 b 1 e 5 a d 3 6 6 5 2 9 0 e a 3 9 3 2 0 b 9 1 e 1 b e 1 e 0 d 5 f 6 0 6 5 2 b 9 6 4 a 3 0 7 0 2 1 6 d e 8 3 d 2 e 4 7 c " ;
} ;
propagatedBuildInputs = [ itsdangerous ] ;
checkInputs = [ pytestCheckHook requests hypothesis pytest-timeout ] ;
2021-12-06 16:07:01 +00:00
postPatch = ''
# ResourceWarning causes tests to fail
rm tests/test_routing.py
'' ;
2021-07-24 12:14:16 +00:00
disabledTests = [
" t e s t _ s a v e _ t o _ p a t h l i b _ d s t "
" t e s t _ c o o k i e _ m a x s i z e "
" t e s t _ c o o k i e _ s a m e s i t e _ a t t r i b u t e "
" t e s t _ c o o k i e _ s a m e s i t e _ i n v a l i d "
" t e s t _ r a n g e _ p a r s i n g "
" t e s t _ c o n t e n t _ r a n g e _ p a r s i n g "
" t e s t _ h t t p _ d a t e _ l t _ 1 0 0 0 "
" t e s t _ b e s t _ m a t c h _ w o r k s "
" t e s t _ d a t e _ t o _ u n i x "
" t e s t _ e a s t e r e g g "
# Seems to be a problematic test-case:
#
# > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
# E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]>
# E
# E Traceback (most recent call last):
# E File "/nix/store/cwv8aj4vsqvimzljw5dxsxy663vjgibj-python3.9-Werkzeug-1.0.1/lib/python3.9/site-packages/werkzeug/formparser.py", line 318, in parse_multipart_headers
# E return Headers(result)
# E ResourceWarning: unclosed file <_io.FileIO name=11 mode='rb+' closefd=True>
2021-12-06 16:07:01 +00:00
" t e s t _ b a s i c _ r o u t i n g "
" t e s t _ m e r g e _ s l a s h e s _ m a t c h "
" t e s t _ m e r g e _ s l a s h e s _ b u i l d "
2021-07-24 12:14:16 +00:00
" T e s t M u l t i P a r t "
2021-10-06 13:57:05 +00:00
" T e s t H T T P U t i l i t y "
2021-07-24 12:14:16 +00:00
] ++ lib . optionals stdenv . isDarwin [
2021-06-28 23:13:55 +00:00
" t e s t _ g e t _ m a c h i n e _ i d "
] ;
meta = with lib ; {
homepage = " h t t p s : / / p a l l e t s p r o j e c t s . c o m / p / w e r k z e u g / " ;
description = " A W S G I u t i l i t y l i b r a r y f o r P y t h o n " ;
license = licenses . bsd3 ;
maintainers = [ ] ;
} ;
}