mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
remove whitespace in parentheses (PEP 8)
This commit is contained in:
parent
ab843c0b7a
commit
4dcdec664a
@ -5,12 +5,12 @@ from gnucash import Book, Account, Split, GncCommodity, GncNumeric, \
|
|||||||
|
|
||||||
from test_book import BookSession
|
from test_book import BookSession
|
||||||
|
|
||||||
class AccountSession( BookSession ):
|
class AccountSession(BookSession):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
BookSession.setUp(self)
|
BookSession.setUp(self)
|
||||||
self.account = Account(self.book)
|
self.account = Account(self.book)
|
||||||
|
|
||||||
class TestAccount( AccountSession ):
|
class TestAccount(AccountSession):
|
||||||
def test_name(self):
|
def test_name(self):
|
||||||
NAME = "Money"
|
NAME = "Money"
|
||||||
self.assertEqual( '', self.account.GetName() )
|
self.assertEqual( '', self.account.GetName() )
|
||||||
|
@ -2,14 +2,14 @@ from unittest import TestCase, main
|
|||||||
|
|
||||||
from gnucash import Session
|
from gnucash import Session
|
||||||
|
|
||||||
class BookSession( TestCase ):
|
class BookSession(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ses = Session()
|
self.ses = Session()
|
||||||
self.book = self.ses.get_book()
|
self.book = self.ses.get_book()
|
||||||
self.table = self.book.get_table()
|
self.table = self.book.get_table()
|
||||||
self.currency = self.table.lookup('CURRENCY', 'EUR')
|
self.currency = self.table.lookup('CURRENCY', 'EUR')
|
||||||
|
|
||||||
class TestBook( BookSession ):
|
class TestBook(BookSession):
|
||||||
def test_markclosed(self):
|
def test_markclosed(self):
|
||||||
self.ses.end()
|
self.ses.end()
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ from gnucash.gnucash_business import Vendor, Employee, Customer, Job, Invoice, E
|
|||||||
|
|
||||||
from test_book import BookSession
|
from test_book import BookSession
|
||||||
|
|
||||||
class BusinessSession( BookSession ):
|
class BusinessSession(BookSession):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
BookSession.setUp(self)
|
BookSession.setUp(self)
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class BusinessSession( BookSession ):
|
|||||||
self.invoice.PostToAccount(self.receivable,
|
self.invoice.PostToAccount(self.receivable,
|
||||||
self.today, self.today, "", True, False)
|
self.today, self.today, "", True, False)
|
||||||
|
|
||||||
class TestBusiness( BusinessSession ):
|
class TestBusiness(BusinessSession):
|
||||||
def test_equal(self):
|
def test_equal(self):
|
||||||
self.assertTrue( self.vendor.Equal( self.vendor.GetVendor() ) )
|
self.assertTrue( self.vendor.Equal( self.vendor.GetVendor() ) )
|
||||||
self.assertTrue( self.customer.Equal( self.job.GetOwner() ) )
|
self.assertTrue( self.customer.Equal( self.job.GetOwner() ) )
|
||||||
|
@ -2,7 +2,7 @@ from unittest import TestCase, main
|
|||||||
|
|
||||||
from gnucash import Session
|
from gnucash import Session
|
||||||
|
|
||||||
class CommoditySession( TestCase ):
|
class CommoditySession(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ses = Session()
|
self.ses = Session()
|
||||||
self.book = self.ses.get_book()
|
self.book = self.ses.get_book()
|
||||||
@ -11,12 +11,12 @@ class CommoditySession( TestCase ):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.ses.end()
|
self.ses.end()
|
||||||
|
|
||||||
class TestCommodity( CommoditySession ):
|
class TestCommodity(CommoditySession):
|
||||||
def test_iso_currency(self):
|
def test_iso_currency(self):
|
||||||
eur = self.table.lookup('CURRENCY', 'EUR')
|
eur = self.table.lookup('CURRENCY', 'EUR')
|
||||||
self.assertIsNotNone(eur)
|
self.assertIsNotNone(eur)
|
||||||
|
|
||||||
class TestCommodityNamespace( CommoditySession ):
|
class TestCommodityNamespace(CommoditySession):
|
||||||
def test_namespaces(self):
|
def test_namespaces(self):
|
||||||
#print(self.table.__class__)
|
#print(self.table.__class__)
|
||||||
namespace_names = self.table.get_namespaces()
|
namespace_names = self.table.get_namespaces()
|
||||||
|
@ -3,7 +3,7 @@ from unittest import TestCase, main
|
|||||||
from gnucash import GncNumeric, GNC_DENOM_AUTO, GNC_HOW_DENOM_FIXED, \
|
from gnucash import GncNumeric, GNC_DENOM_AUTO, GNC_HOW_DENOM_FIXED, \
|
||||||
GNC_HOW_RND_NEVER, GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL
|
GNC_HOW_RND_NEVER, GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL
|
||||||
|
|
||||||
class TestGncNumeric( TestCase ):
|
class TestGncNumeric(TestCase):
|
||||||
def test_defaut(self):
|
def test_defaut(self):
|
||||||
num = GncNumeric()
|
num = GncNumeric()
|
||||||
self.assertEqual(str(num), "0/1")
|
self.assertEqual(str(num), "0/1")
|
||||||
|
@ -5,7 +5,7 @@ from unittest_support import *
|
|||||||
|
|
||||||
from test_book import BookSession
|
from test_book import BookSession
|
||||||
|
|
||||||
class SplitSession( BookSession ):
|
class SplitSession(BookSession):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
||||||
BookSession.setUp(self)
|
BookSession.setUp(self)
|
||||||
@ -14,7 +14,7 @@ class SplitSession( BookSession ):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class TestSplit( SplitSession ):
|
class TestSplit(SplitSession):
|
||||||
def test_memo(self):
|
def test_memo(self):
|
||||||
MEMO = "cookie monster"
|
MEMO = "cookie monster"
|
||||||
self.assertEqual( '', self.split.GetMemo() )
|
self.assertEqual( '', self.split.GetMemo() )
|
||||||
|
@ -5,7 +5,7 @@ from unittest_support import *
|
|||||||
|
|
||||||
from test_book import BookSession
|
from test_book import BookSession
|
||||||
|
|
||||||
class TransactionSession( BookSession ):
|
class TransactionSession(BookSession):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.domain1 = "gnc.engine"
|
self.domain1 = "gnc.engine"
|
||||||
self.domain2 = "gnc.engine.scrub"
|
self.domain2 = "gnc.engine.scrub"
|
||||||
@ -40,7 +40,7 @@ class TransactionSession( BookSession ):
|
|||||||
g_log_remove_handler(self.domain2, self.hdlr2)
|
g_log_remove_handler(self.domain2, self.hdlr2)
|
||||||
test_clear_error_list ()
|
test_clear_error_list ()
|
||||||
|
|
||||||
class TestTransaction( TransactionSession ):
|
class TestTransaction(TransactionSession):
|
||||||
def test_equal(self):
|
def test_equal(self):
|
||||||
TRANS = self.trans
|
TRANS = self.trans
|
||||||
self.assertTrue( TRANS.Equal(self.trans, True, False, False, False) )
|
self.assertTrue( TRANS.Equal(self.trans, True, False, False, False) )
|
||||||
|
Loading…
Reference in New Issue
Block a user