Skip to content

Commit

Permalink
Cleanup style for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
comrumino committed Feb 5, 2024
1 parent 69344e7 commit dc7093f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import rpyc
from pathlib import Path


def load_tests(loader, standard_tests, pattern):
# Hook rpyc logger, unittest verbosity, and system paths
#rpyc.core.DEFAULT_CONFIG['logger'] = rpyc.lib.setup_logger()
# rpyc.core.DEFAULT_CONFIG['logger'] = rpyc.lib.setup_logger()
rpyc_tests_path = Path(__file__).absolute().parent
rpyc_path = rpyc_tests_path.parent
for p in [str(rpyc_path), str(rpyc_tests_path)]:
Expand Down
8 changes: 3 additions & 5 deletions tests/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from rpyc.utils.server import ThreadedServer
from shutil import which

GDB_ENABLED = False # Disabled until passes for gdb 7 functional


class ParentGDB(rpyc.Service):
""" starts a new gdb service instance on connect and quits on disconnect """
Expand All @@ -32,7 +34,7 @@ def on_disconnect(self, conn):
def exposed_get_gdb(self):
return self.gdb_svc_conn.root.get()

GDB_ENABLED = False # Disabled until passes for gdb 7 functional

@unittest.skipUnless(which('gdb') is not None and GDB_ENABLED, "Skipping gdb example test since gdb not found")
class Test_GDB(unittest.TestCase):

Expand Down Expand Up @@ -66,7 +68,3 @@ def test_gdb(self):
print(4)
self.assertIn('End of assembler dump', disasm)
parent_gdb_conn.close()


if __name__ == "__main__":
unittest.main()

0 comments on commit dc7093f

Please sign in to comment.