From 9ff6fcfd4f0930c77ad3eb8b52d7328b86526cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 14 Aug 2009 23:08:39 +0200 Subject: Some runtime tests --- test.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test.py (limited to 'test.py') diff --git a/test.py b/test.py new file mode 100644 index 0000000..5cf8621 --- /dev/null +++ b/test.py @@ -0,0 +1,27 @@ +from portato import _sub_start +_sub_start() + +from portato.eix import EixReader +from portato.backend import system + +def run(): + with EixReader("/var/cache/eix") as eix: + for c in eix.categories: + c.name + for p in c.packages: + p.name + +def run2(): + for i in system.find_packages(with_version = False): + cat, pkg = i.split("/") + +def run3(): + inst = system.find_packages(pkgSet = system.SET_INSTALLED, with_version = False) + + for i in range(200): + "bla" in inst + +def run4(): + inst = set(system.find_packages(pkgSet = system.SET_INSTALLED, with_version = False)) + for i in range(200): + "bla" in inst -- cgit v1.2.3