Python Tests
John Ralls
jralls at ceridwen.us
Mon Jul 18 14:02:18 EDT 2011
After the issue last night & this morning with g_printf, I decided it would be prudent to build and check the current tree on a Fedora 14 VM (what I happen to have installed on my laptop). After a few dependency issues (for some reason WebKit needs gstreamer-devel and gstreamer-base-modules-devel to be happy), got everything built and tested.
Except for python-bindings.
I made some changes (see below) to get everything to pass, but I'm not sure that they're the right thing to do. Mike or Christian, please look this over; if it is the right thing, I'll commit it.
Regards,
John Ralls
svn diff src/optional/python-bindings/
Index: src/optional/python-bindings/tests/test_book.py
===================================================================
--- src/optional/python-bindings/tests/test_book.py (revision 20939)
+++ src/optional/python-bindings/tests/test_book.py (working copy)
@@ -1,6 +1,6 @@
from unittest import TestCase, main
-from gnucash import Session
+from gnucash_core import Session
class BookSession( TestCase ):
def setUp(self):
Index: src/optional/python-bindings/tests/test_split.py
===================================================================
--- src/optional/python-bindings/tests/test_split.py (revision 20939)
+++ src/optional/python-bindings/tests/test_split.py (working copy)
@@ -1,6 +1,6 @@
from unittest import main
-from gnucash import Book, Account, Split, Transaction
+from gnucash_core import Book, Account, Split, Transaction
from test_book import BookSession
Index: src/optional/python-bindings/tests/test_account.py
===================================================================
--- src/optional/python-bindings/tests/test_account.py (revision 20939)
+++ src/optional/python-bindings/tests/test_account.py (working copy)
@@ -1,6 +1,6 @@
from unittest import main
-from gnucash import Book, Account, Split
+from gnucash_core import Book, Account, Split
from test_book import BookSession
Index: src/optional/python-bindings/tests/Makefile.am
===================================================================
--- src/optional/python-bindings/tests/Makefile.am (revision 20939)
+++ src/optional/python-bindings/tests/Makefile.am (working copy)
@@ -1,4 +1,4 @@
-TESTS_ENVIRONMENT = PYTHONPATH=$(PYTHONPATH):$(pythondir) $(top_builddir)/src/bin/gnucash-env $(PYTHON)
+TESTS_ENVIRONMENT = PYTHONPATH=$(PYTHONPATH):$(pythondir):..:../.libs $(top_builddir)/src/bin/gnucash-env $(PYTHON)
TESTS = runTests.py
clean-local:
Index: src/optional/python-bindings/tests/test_transaction.py
===================================================================
--- src/optional/python-bindings/tests/test_transaction.py (revision 20939)
+++ src/optional/python-bindings/tests/test_transaction.py (working copy)
@@ -1,6 +1,6 @@
from unittest import main
-from gnucash import Transaction, Book, Account, Split
+from gnucash_core import Transaction, Book, Account, Split
from test_book import BookSession
Index: src/optional/python-bindings/gnucash_core.py
===================================================================
--- src/optional/python-bindings/gnucash_core.py (revision 20939)
+++ src/optional/python-bindings/gnucash_core.py (working copy)
@@ -439,23 +439,23 @@
# GncNumeric denominator computation schemes
# Used for the denom argument in arithmetic functions like GncNumeric.add
-from gnucash.gnucash_core_c import GNC_DENOM_AUTO
+from _gnucash_core_c import GNC_DENOM_AUTO
# GncNumeric rounding instructions
# used for the how argument in arithmetic functions like GncNumeric.add
-from gnucash.gnucash_core_c import \
+from _gnucash_core_c import \
GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC, \
GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN, \
GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER
# GncNumeric denominator types
# used for the how argument in arithmetic functions like GncNumeric.add
-from gnucash.gnucash_core_c import \
+from _gnucash_core_c import \
GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD, \
GNC_HOW_DENOM_FIXED
# import account types
-from gnucash.gnucash_core_c import \
+from _gnucash_core_c import \
ACCT_TYPE_ASSET, ACCT_TYPE_BANK, ACCT_TYPE_CASH, ACCT_TYPE_CHECKING, \
ACCT_TYPE_CREDIT, ACCT_TYPE_EQUITY, ACCT_TYPE_EXPENSE, ACCT_TYPE_INCOME, \
ACCT_TYPE_LIABILITY, ACCT_TYPE_MUTUAL, ACCT_TYPE_PAYABLE, \
More information about the gnucash-devel
mailing list