[py-svn] commit/pytest: hpk42: some updates, add fslayout idea
Bitbucket
commits-noreply at bitbucket.org
Thu Dec 1 11:52:02 CET 2011
1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/changeset/5ee61fe7cb9a/
changeset: 5ee61fe7cb9a
user: hpk42
date: 2011-12-01 11:51:43
summary: some updates, add fslayout idea
affected #: 1 file
diff -r c350e81eba007b8037b0562b0a6f6fdd9fd9b05f -r 5ee61fe7cb9a00df76551153af37f3113d7daffa ISSUES.txt
--- a/ISSUES.txt
+++ b/ISSUES.txt
@@ -105,7 +105,7 @@
to better implement the word meaning. It also signals
better that we always have some kind of an implementation
reason that can be formualated.
-Compatibility? Maybe rename to "pytest.mark.xfail"?
+Compatibility? how to introduce a new name/keep compat?
introduce py.test.mark registration
-----------------------------------------
@@ -250,3 +250,25 @@
in collect.py. Probably good:
- inline consider_file/dir methods, no need to have them
subclass-overridable because of hooks
+
+implement fslayout decorator
+---------------------------------
+tags: feature
+
+Improve the way how tests can work with pre-made examples,
+keeping the layout close to the test function:
+
+ at pytest.mark.fslayout("""
+ conftest.py:
+ # empty
+ tests/
+ test_%(NAME)s: # becomes test_run1.py
+ def test_function(self):
+ pass
+""")
+def test_run(pytester, fslayout):
+ p = fslayout.find("test_*.py")
+ result = pytester.runpytest(p)
+ assert result.ret == 0
+ assert result.passed == 1
+
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list