diff --git a/tests/all_tests.py b/tests/all_tests.py
index 01bc36e88b0a69572b95b65d8e30b64de711540b..de388878e699e32834af523c5ecf68227e96410d 100755
--- a/tests/all_tests.py
+++ b/tests/all_tests.py
@@ -54,7 +54,7 @@ class AllTests(unittest.TestCase):
     def _get_module_strings(self):
         modules = []
         for file_string in self.test_file_strings:
-            modules.append(file_string[len(tests_dir):len(file_string) - 3].replace('/', '.'))
+            modules.append(file_string[len(tests_dir):len(file_string) - 3].replace(os.sep, '.'))
 
         return modules