From ef394e06cf4b7f2e1ab3132fc4a2e21ada7f52cd Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Tue, 27 Nov 2018 18:10:33 +0000 Subject: Make dep8 nm test directly invokable By renaming the test to nm.py, it can be called directly with: python3 -m unittest nm To make this work, we also need to move required test setup and teardown code to setUpModule() and tearDownModule() accordingly, and move other "script" code into the __name__ == '__main__' idiom. This then allows easier debugging of failing tests by calling unittest to run a specific test using the usual method. For example: sudo python3 -m unittest nm.ColdplugWifi.test_open_b_ip6_raonly_no_pe --- debian/tests/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/tests/control') diff --git a/debian/tests/control b/debian/tests/control index 14ebb2f5..a8f4d148 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -2,7 +2,7 @@ Tests: wpa-dhclient Depends: python3, hostapd, dnsmasq-base, wpasupplicant, isc-dhcp-client, iw Restrictions: needs-root allow-stderr isolation-machine -Tests: nm +Tests: nm.py Depends: python3, dnsmasq-base, isc-dhcp-client, gir1.2-networkmanager-1.0, network-manager, hostapd, iw, python3-dbusmock Restrictions: needs-root isolation-machine -- cgit 1.3.0-6-gf8a5