diff --git a/test/framework.py b/test/framework.py
index 85bd661..efb1e6b 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -144,12 +144,14 @@
 def _is_skip_aarch64_set():
     return os.getenv('SKIP_AARCH64', 'n').lower() in ('yes', 'y', '1')
 
+
 is_skip_aarch64_set = _is_skip_aarch64_set()
 
 
 def _is_platform_aarch64():
     return platform.machine() == 'aarch64'
 
+
 is_platform_aarch64 = _is_platform_aarch64()
 
 
@@ -157,6 +159,7 @@
     s = os.getenv("EXTENDED_TESTS", "n")
     return True if s.lower() in ("y", "yes", "1") else False
 
+
 running_extended_tests = _running_extended_tests()
 
 
@@ -164,6 +167,7 @@
     os_id = os.getenv("OS_ID", "")
     return True if "centos" in os_id.lower() else False
 
+
 running_on_centos = _running_on_centos
 
 
@@ -926,8 +930,8 @@
                 for cf in checksum_fields:
                     if hasattr(layer, cf):
                         if ignore_zero_udp_checksums and \
-                                        0 == getattr(layer, cf) and \
-                                        layer.name in udp_layers:
+                                0 == getattr(layer, cf) and \
+                                layer.name in udp_layers:
                             continue
                         delattr(layer, cf)
                         checksums.append((counter, cf))
@@ -1005,7 +1009,7 @@
             counter_value = self.statistics.get_counter(counter)
         else:
             counters = self.vapi.cli("sh errors").split('\n')
-            counter_value = -1
+            counter_value = 0
             for i in range(1, len(counters) - 1):
                 results = counters[i].split()
                 if results[1] == counter:
@@ -1014,18 +1018,9 @@
         return counter_value
 
     def assert_packet_counter_equal(self, counter, expected_value):
-        if counter.startswith("/"):
-            counter_value = self.statistics.get_counter(counter)
-            self.assert_equal(counter_value, expected_value,
-                              "packet counter `%s'" % counter)
-        else:
-            counters = self.vapi.cli("sh errors").split('\n')
-            counter_value = -1
-            for i in range(1, len(counters) - 1):
-                results = counters[i].split()
-                if results[1] == counter:
-                    counter_value = int(results[0])
-                    break
+        counter_value = self.get_packet_counter(counter)
+        self.assert_equal(counter_value, expected_value,
+                          "packet counter `%s'" % counter)
 
     def assert_error_counter_equal(self, counter, expected_value):
         counter_value = self.statistics.get_err_counter(counter)
@@ -1455,5 +1450,6 @@
         self.logger.info(single_line_delim)
         self.result = self.process.returncode
 
+
 if __name__ == '__main__':
     pass
