diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-24 13:16:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-24 13:16:28 -0400 |
commit | d525db35d879d367264ce3093d508f6b3d9b5f89 (patch) | |
tree | 8da522d2d10bd77784a76ff3ee2f49e0b8f2c181 | |
parent | 07fcc3a08af552bd40d4bd5103d4668662acdaf4 (diff) | |
download | fork-ledger-d525db35d879d367264ce3093d508f6b3d9b5f89.tar.gz fork-ledger-d525db35d879d367264ce3093d508f6b3d9b5f89.tar.bz2 fork-ledger-d525db35d879d367264ce3093d508f6b3d9b5f89.zip |
Restored the use of Python unit tests
-rw-r--r-- | Makefile.am | 20 | ||||
-rw-r--r-- | test/unit/t_balance.cc | 4 | ||||
-rw-r--r-- | test/unit/t_balance.h | 4 | ||||
-rw-r--r-- | test/unit/t_commodity.cc | 13 | ||||
-rw-r--r-- | test/unit/t_commodity.h | 6 | ||||
-rw-r--r-- | test/unit/t_expr.cc | 4 | ||||
-rw-r--r-- | test/unit/t_expr.h | 4 | ||||
-rw-r--r-- | test/unit/t_times.cc | 5 | ||||
-rw-r--r-- | test/unit/t_times.h | 4 | ||||
-rw-r--r-- | test/unit/t_utils.cc | 8 | ||||
-rw-r--r-- | test/unit/t_utils.h | 8 |
11 files changed, 20 insertions, 60 deletions
diff --git a/Makefile.am b/Makefile.am index 6c60202d..a6254fdd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -247,9 +247,9 @@ TESTS += \ report_tests endif -#if HAVE_BOOST_PYTHON -#TESTS += PyUnitTests -#endif +if HAVE_BOOST_PYTHON +TESTS += PyUnitTests +endif check_PROGRAMS = $(TESTS) @@ -312,7 +312,7 @@ all_tests_sources = \ $(data_tests_SOURCES) \ $(report_tests_SOURCES) -#PyUnitTests_SOURCES = test/__init__.py test/PyUnitTests.py +PyUnitTests_SOURCES = test/__init__.py test/PyUnitTests.py all_py_tests_sources = \ $(patsubst test/unit/%.cc,$(top_builddir)/test/python/%.py, \ @@ -345,12 +345,12 @@ ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'` # jww (2007-05-10): This rule will not be triggered on systems that # define an EXEEXT. -#PyUnitTests: $(srcdir)/test/PyUnitTests.py test/python/UnitTests.py -# @cat $(srcdir)/test/PyUnitTests.py \ -# | sed "s/%python%/$(ESC_python)/" \ -# | sed "s/%srcdir%/$(ESC_srcdir)/g" \ -# | sed "s/%builddir%/$(ESC_builddir)/g" > $@ -# chmod 755 $@ +PyUnitTests: $(srcdir)/test/PyUnitTests.py test/python/UnitTests.py + @cat $(srcdir)/test/PyUnitTests.py \ + | sed "s/%python%/$(ESC_python)/" \ + | sed "s/%srcdir%/$(ESC_srcdir)/g" \ + | sed "s/%builddir%/$(ESC_builddir)/g" > $@ + chmod 755 $@ RegressionTests_SOURCES = test/regress.py diff --git a/test/unit/t_balance.cc b/test/unit/t_balance.cc index 93d97d6a..50694612 100644 --- a/test/unit/t_balance.cc +++ b/test/unit/t_balance.cc @@ -23,7 +23,3 @@ void BalanceTestCase::tearDown() amount_t::stream_fullstrings = false; amount_t::shutdown(); } - -void BalanceTestCase::testConstructors() -{ -} diff --git a/test/unit/t_balance.h b/test/unit/t_balance.h index fea68b8a..8b8ce1b7 100644 --- a/test/unit/t_balance.h +++ b/test/unit/t_balance.h @@ -7,7 +7,7 @@ class BalanceTestCase : public CPPUNIT_NS::TestCase { CPPUNIT_TEST_SUITE(BalanceTestCase); - CPPUNIT_TEST(testConstructors); + //CPPUNIT_TEST(testConstructors); CPPUNIT_TEST_SUITE_END(); @@ -18,7 +18,7 @@ public: virtual void setUp(); virtual void tearDown(); - void testConstructors(); + //void testConstructors(); private: BalanceTestCase(const BalanceTestCase ©); diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc index 9e38c823..ad5e91b4 100644 --- a/test/unit/t_commodity.cc +++ b/test/unit/t_commodity.cc @@ -99,16 +99,3 @@ void CommodityTestCase::testPriceHistory() assertValid(x1); } - -void CommodityTestCase::testLots() -{ -} - -void CommodityTestCase::testScalingBase() -{ -} - -void CommodityTestCase::testReduction() -{ -} - diff --git a/test/unit/t_commodity.h b/test/unit/t_commodity.h index 67903628..1dadb450 100644 --- a/test/unit/t_commodity.h +++ b/test/unit/t_commodity.h @@ -8,9 +8,6 @@ class CommodityTestCase : public CPPUNIT_NS::TestCase CPPUNIT_TEST_SUITE(CommodityTestCase); CPPUNIT_TEST(testPriceHistory); - CPPUNIT_TEST(testLots); - CPPUNIT_TEST(testScalingBase); - CPPUNIT_TEST(testReduction); CPPUNIT_TEST_SUITE_END(); @@ -22,9 +19,6 @@ public: virtual void tearDown(); void testPriceHistory(); - void testLots(); - void testScalingBase(); - void testReduction(); private: CommodityTestCase(const CommodityTestCase ©); diff --git a/test/unit/t_expr.cc b/test/unit/t_expr.cc index 57aec44b..b0bad813 100644 --- a/test/unit/t_expr.cc +++ b/test/unit/t_expr.cc @@ -15,7 +15,3 @@ void ValueExprTestCase::tearDown() { amount_t::shutdown(); } - -void ValueExprTestCase::testConstructors() -{ -} diff --git a/test/unit/t_expr.h b/test/unit/t_expr.h index 50813ea3..f1289143 100644 --- a/test/unit/t_expr.h +++ b/test/unit/t_expr.h @@ -7,7 +7,7 @@ class ValueExprTestCase : public CPPUNIT_NS::TestCase { CPPUNIT_TEST_SUITE(ValueExprTestCase); - CPPUNIT_TEST(testConstructors); + //CPPUNIT_TEST(testConstructors); CPPUNIT_TEST_SUITE_END(); @@ -18,7 +18,7 @@ public: virtual void setUp(); virtual void tearDown(); - void testConstructors(); + //void testConstructors(); private: ValueExprTestCase(const ValueExprTestCase ©); diff --git a/test/unit/t_times.cc b/test/unit/t_times.cc index 59acd98e..5b2e4d8f 100644 --- a/test/unit/t_times.cc +++ b/test/unit/t_times.cc @@ -6,11 +6,6 @@ using namespace ledger; CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(DateTimeTestCase, "util"); -void DateTimeTestCase::setUp() { -} -void DateTimeTestCase::tearDown() { -} - void DateTimeTestCase::testConstructors() { #ifndef NOT_FOR_PYTHON diff --git a/test/unit/t_times.h b/test/unit/t_times.h index 5bbadf21..28784113 100644 --- a/test/unit/t_times.h +++ b/test/unit/t_times.h @@ -15,8 +15,8 @@ public: DateTimeTestCase() {} virtual ~DateTimeTestCase() {} - virtual void setUp(); - virtual void tearDown(); + //virtual void setUp(); + //virtual void tearDown(); void testConstructors(); diff --git a/test/unit/t_utils.cc b/test/unit/t_utils.cc index 07be2815..c6861dd1 100644 --- a/test/unit/t_utils.cc +++ b/test/unit/t_utils.cc @@ -2,11 +2,3 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(UtilitiesTestCase, "util"); -void UtilitiesTestCase::setUp() { -} -void UtilitiesTestCase::tearDown() { -} - -void UtilitiesTestCase::testConstructors() -{ -} diff --git a/test/unit/t_utils.h b/test/unit/t_utils.h index 97154bae..4520c580 100644 --- a/test/unit/t_utils.h +++ b/test/unit/t_utils.h @@ -7,7 +7,7 @@ class UtilitiesTestCase : public CPPUNIT_NS::TestCase { CPPUNIT_TEST_SUITE(UtilitiesTestCase); - CPPUNIT_TEST(testConstructors); + //CPPUNIT_TEST(testConstructors); CPPUNIT_TEST_SUITE_END(); @@ -15,10 +15,10 @@ public: UtilitiesTestCase() {} virtual ~UtilitiesTestCase() {} - virtual void setUp(); - virtual void tearDown(); + //virtual void setUp(); + //virtual void tearDown(); - void testConstructors(); + //void testConstructors(); private: UtilitiesTestCase(const UtilitiesTestCase ©); |