aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-05-10 01:49:48 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-05-14 11:29:40 -0700
commit3c3c4cf1fd7e99995ccdfd43320cce1a97432b99 (patch)
tree7f922d910bf398f595cad9c5c98d1f567aa79943 /repoman/TEST-NOTES
parentrepoman Comment out the $ID header check for now. bug 579460 (diff)
downloadportage-3c3c4cf1fd7e99995ccdfd43320cce1a97432b99.tar.gz
portage-3c3c4cf1fd7e99995ccdfd43320cce1a97432b99.tar.bz2
portage-3c3c4cf1fd7e99995ccdfd43320cce1a97432b99.zip
Bulk move of repoman to it's own namespace for better packaging
Edit repoman calls from portage setup.py, MANIFEST.in. Copy setup.py to the new repoman pkg, begin edit for repoman. Copy TEST-NOTES to repoman
Diffstat (limited to 'repoman/TEST-NOTES')
-rw-r--r--repoman/TEST-NOTES45
1 files changed, 45 insertions, 0 deletions
diff --git a/repoman/TEST-NOTES b/repoman/TEST-NOTES
new file mode 100644
index 000000000..f9c6ab0cd
--- /dev/null
+++ b/repoman/TEST-NOTES
@@ -0,0 +1,45 @@
+UnitTests
+---------
+
+Portage has some tests that use the unittest framework that ships with python (2.3-2.4ish)
+Tests have a specific naming convention.
+
+in pym/portage/tests/ there is a runTest script that invokes pym/portage/tests/__init__.py
+
+This init looks at a hardcoded list of test dirs to search for tests.
+If you add a new dir and don't see your new tests, make sure that the dir is in this list.
+
+On the subject of adding more directories; the layout is basically 1 directory per portage
+file at this point (we have few files, and even fewer large files). Inside of the dir
+you should have files of the form test_${function}.py.
+
+So if I was to write a vercmp test, and vercmp is in portage_versions.
+
+pym/portage/tests/portage_versions/test_vercmp.py
+
+would be the filename.
+
+The __init__.py file now does recursive tests, but you need to tell it so. For example, if
+you had cache tests the dir format would be something like...
+
+pym/portage/tests/cache/flat_hash/test_foo.py
+
+and you would put "cache/flat_hash" into the testDirs variable in __init__.py.
+
+
+Skipping
+--------
+
+Please use the portage.tests.* classes as they support throwing a SkipException for
+tests that are known to fail. Normally one uses testing to do Test Driven Development
+(TDD); however we do not do that here. Therefore there are times when legitimate tests
+exist but fail due to code in trunk. We would still like the suite to pass in some instances
+because the suite is built around two things, testing functionality in the current code as
+well as poking holes in the current code (isvalidatom is an example). So sometimes we desire
+a test to point out that "this needs fixing" but it doesn't affect portage's overall
+functionality. You should raise portage.tests.SkipException in that case.
+
+emerge
+------
+
+The emerge namespace currently has 0 tests (and no runner)