[Piglit] [PATCH 13/49] unittests: port exceptions_tests to pytest

Dylan Baker dylan at pnwbakers.com
Fri Jul 29 18:38:59 UTC 2016


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 .../{exceptions_tests.py => framework/test_exceptions.py}     | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
 rename unittests/{exceptions_tests.py => framework/test_exceptions.py} (89%)

diff --git a/unittests/exceptions_tests.py b/unittests/framework/test_exceptions.py
similarity index 89%
rename from unittests/exceptions_tests.py
rename to unittests/framework/test_exceptions.py
index 7b40933..08f87c9 100644
--- a/unittests/exceptions_tests.py
+++ b/unittests/framework/test_exceptions.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Intel Corporation
+# Copyright (c) 2015-2016 Intel Corporation
 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -24,14 +24,15 @@ from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
 
-import nose.tools as nt
+import pytest
 
-from . import utils
 from framework import exceptions
 
+# Good test names often are not PEP8
+# pylint: disable=invalid-name
 
- at nt.raises(SystemExit)
- at utils.nose.capture_stderr
+
+ at pytest.mark.raises(exception=SystemExit)
 @exceptions.handler
 def test_handle_PiglitFatalError():
     """exceptions.handler: Handles PiglitFatalError"""
-- 
2.9.0



More information about the Piglit mailing list