From a4a86288e4abdc9b8c090a8ce05c863a6080fbb0 Mon Sep 17 00:00:00 2001
From: Matthias Diener <mdiener@illinois.edu>
Date: Mon, 28 Jun 2021 13:38:58 -0500
Subject: [PATCH] fix pytest xdist

---
 arraycontext/pytest.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arraycontext/pytest.py b/arraycontext/pytest.py
index 6f56144..e0beb06 100644
--- a/arraycontext/pytest.py
+++ b/arraycontext/pytest.py
@@ -69,6 +69,13 @@ class PytestPyOpenCLArrayContextFactory:
     def __call__(self) -> ArrayContext:
         raise NotImplementedError
 
+    def __str__(self):
+        return ("<%s for <pyopencl.Device '%s' on '%s'>" %
+                (
+                    self.actx_class.__name__,
+                    self.device.name.strip(),
+                    self.device.platform.name.strip()))
+
 
 class _PytestPyOpenCLArrayContextFactoryWithClass(PytestPyOpenCLArrayContextFactory):
     force_device_scalars = True
@@ -89,13 +96,6 @@ class _PytestPyOpenCLArrayContextFactoryWithClass(PytestPyOpenCLArrayContextFact
                 queue,
                 force_device_scalars=self.force_device_scalars)
 
-    def __str__(self):
-        return ("<%s for <pyopencl.Device '%s' on '%s'>" %
-                (
-                    self.actx_class.__name__,
-                    self.device.name.strip(),
-                    self.device.platform.name.strip()))
-
 
 class _PytestPyOpenCLArrayContextFactoryWithClassAndHostScalars(
         _PytestPyOpenCLArrayContextFactoryWithClass):
-- 
GitLab