From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: doc/
Date: Mon, 20 Jun 2011 19:20:36 +0000 (UTC) [thread overview]
Message-ID: <bf06933c9d33ee68241646630d85b051e7f5febe.mgorny@gentoo> (raw)
commit: bf06933c9d33ee68241646630d85b051e7f5febe
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 20 19:19:32 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 19:19:32 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=bf06933c
Add docs about the TestCase.
---
doc/library-format.md | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/doc/library-format.md b/doc/library-format.md
index 14d6e00..203c6c4 100644
--- a/doc/library-format.md
+++ b/doc/library-format.md
@@ -58,11 +58,35 @@ The above example would load two tests:
- and `FooTest` from `PMSTestSuite.library.foobar.bar`.
+The test class
+--------------
+
+Each _test case_ has to be a subclass of `PMSTestSuite.library.case.TestCase`.
+That class represents a most general test case with an interface described
+above. A particular subclass needs to override the following methods:
+
+- `get_output_files()` returning a dict representing files which should be
+ output to the test repository (keys being filenames relative
+ to the repository root and values being file contents),
+- `clean()` removing any merged test data before and after performing the test,
+- `start()` starting (scheduling) the actual test,
+- `check_result()` checking the test results. It should return True if the test
+ succeeded and False otherwise.
+
+The three latter functions will be passed a `PackageManager` instance, which
+methods `merge()`, `unmerge()` and `lookup_vardb()` can be used. For more
+information, please see the docs of `PMSTestSuite.pm` module.
+
+In most cases, though, you won't be subclassing `TestCase` directly but using
+one of its subclasses defined in the `PMSTestSuite.library` submodules.
+
+
More information
----------------
1. `pydoc PMSTestSuite.library`
2. `pydoc PMSTestSuite.library.case`
-3. `pydoc PMSTestSuite.library.depend_case`
+3. `pydoc PMSTestSuite.pm.PackageManager`
+4. `pydoc PMSTestSuite.library.depend_case`
<!-- vim:se syn=markdown :-->
next reply other threads:[~2011-06-20 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 19:20 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-29 17:52 [gentoo-commits] proj/pms-test-suite:master commit in: doc/ Michał Górny
2011-06-20 11:32 Michał Górny
2011-06-19 10:54 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf06933c9d33ee68241646630d85b051e7f5febe.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox