[Piglit] [PATCH 30/49] unittests: port summary_html_tests to pytest
Dylan Baker
dylan at pnwbakers.com
Fri Jul 29 18:39:16 UTC 2016
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
.../summary/test_html.py} | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
rename unittests/{summary_html_tests.py => framework/summary/test_html.py} (73%)
diff --git a/unittests/summary_html_tests.py b/unittests/framework/summary/test_html.py
similarity index 73%
rename from unittests/summary_html_tests.py
rename to unittests/framework/summary/test_html.py
index 1474ca5..f645b41 100644
--- a/unittests/summary_html_tests.py
+++ b/unittests/framework/summary/test_html.py
@@ -27,25 +27,14 @@ from __future__ import (
)
import os
-import nose.tools as nt
import six
-try:
- from six.moves import getcwd
-except ImportError:
- # pylint: disable=no-member
- if six.PY2:
- getcwd = os.getcwdu
- elif six.PY3:
- getcwd = os.getcwd
- # pylint: enable=no-member
from framework.summary import html_
-from . import utils
- at utils.nose.test_in_tempdir
-def test_copy_static():
+def test_copy_static(tmpdir):
"""summary.html_._copy_static: puts status content in correct locations"""
- html_._copy_static_files(getcwd())
- nt.ok_(os.path.exists('index.css'), msg='index.css not created correctly')
- nt.ok_(os.path.exists('result.css'), msg='result.css not created correctly')
+ tmpdir.chdir()
+ html_._copy_static_files(six.text_type(tmpdir))
+ assert os.path.exists('index.css'), 'index.css not created correctly'
+ assert os.path.exists('result.css'), 'result.css not created correctly'
--
2.9.0
More information about the Piglit
mailing list