[d-feet] Fix unittests
- From: Thomas Bechtold <toabctl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [d-feet] Fix unittests
- Date: Tue, 14 May 2013 15:28:17 +0000 (UTC)
commit af6ccafb7d591f277edcb790b45f7c4de8c0a937
Author: Thomas Bechtold <thomasbechtold jpberlin de>
Date: Tue May 14 16:59:13 2013 +0200
Fix unittests
configure.ac | 1 +
po/POTFILES.in | 7 +++++++
src/Makefile.am | 2 +-
src/tests/Makefile.am | 5 +++++
src/tests/tests.py | 10 ++++++----
5 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d71f32e..0c4b151 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,7 @@ AC_CONFIG_FILES([
po/Makefile.in
src/Makefile
src/dfeet/Makefile
+ src/tests/Makefile
data/Makefile
data/d-feet.desktop.in
data/icons/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 59039aa..f077965 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,10 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
+data/d-feet.desktop.in
data/d-feet.desktop.in.in
+data/ui/addconnectiondialog.ui
+data/ui/buswatch.ui
+data/ui/executedialog.ui
+data/ui/introspection.ui
+data/ui/mainwindow.ui
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 6a092db..d048d0f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = dfeet
+SUBDIRS = dfeet tests
bin_SCRIPTS = d-feet
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
new file mode 100644
index 0000000..994fb22
--- /dev/null
+++ b/src/tests/Makefile.am
@@ -0,0 +1,5 @@
+TESTS = tests.py
+
+check_SCRIPTS = tests.py
+
+EXTRA_DIST = tests.py
\ No newline at end of file
diff --git a/src/tests/tests.py b/src/tests/tests.py
index 7d999e7..209ed3c 100755
--- a/src/tests/tests.py
+++ b/src/tests/tests.py
@@ -24,6 +24,8 @@ XML = """
</node>
"""
+DATA_DIR = os.path.abspath("../../data/")
+
class IntrospectionHelperTest(unittest.TestCase):
"""tests for the introspection helper classes"""
def setUp(self):
@@ -70,18 +72,18 @@ class AddressInfoTest(unittest.TestCase):
def test_system_bus(self):
"""introspect a name on the system bus"""
- ai = AddressInfo(Gio.BusType.SYSTEM, "org.freedesktop.DBus")
+ ai = AddressInfo(DATA_DIR, Gio.BusType.SYSTEM, "org.freedesktop.DBus")
def test_session_bus(self):
"""introspect a name on the session bus"""
- ai = AddressInfo(Gio.BusType.SESSION, "org.freedesktop.DBus")
+ ai = AddressInfo(DATA_DIR, Gio.BusType.SESSION, "org.freedesktop.DBus")
@unittest.skip("TODO: create another bus and test with the other bus")
def test_other_bus(self):
"""test another bus"""
sysbus_addr = os.getenv("DBUS_SYSTEM_BUS_ADDRESS")
- ai = AddressInfo(sysbus_addr, "org.freedesktop.DBus")
-
+ ai = AddressInfo(DATA_DIR, sysbus_addr, "org.freedesktop.DBus")
+
@unittest.skip("TODO:peer to peer test not implemented")
def test_peer_to_peer(self):
"""test a p2p connection"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]