Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W
wendelin.core
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Merge Requests 0
    • Merge Requests 0
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Commits
  • Kirill Smelkov
  • wendelin.core
  • Repository

Switch branch/tag
  • wendelin.core
  • bigarray
  • tests
  • test_basic.py
Find file
BlameHistoryPermalink
  • Kirill Smelkov's avatar
    */tests: Use pytest.raises in modern way · b12e319e
    Kirill Smelkov authored Jul 12, 2019
    Instead of
    
    	raises(Exception, 'code')
    
    do
    
    	with raises(Exception):
    		code
    
    This removes lots of warnings, similar to below example:
    
    	bigfile/tests/test_basic.py::test_basic
    	  /home/kirr/src/wendelin/wendelin.core/bigfile/tests/test_basic.py:79: PytestDeprecationWarning: raises(..., 'code(as_a_string)') is deprecated, use the context manager form or use `exec()` directly
    
    	  See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
    	    raises(ROAttributeError, "f.blksize = 1") # RO attribute
    b12e319e
test_basic.py 25.2 KB
EditWeb IDE

Replace test_basic.py

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号