17800: Avoids saving a new empty collection.
[arvados.git] / sdk / python / tests / arvados_testutil.py
index ebf6297c7cf6077755c41373c1f56ab307de0626..f251ea654b5fed6d0c5f9c837c720aa733b02baf 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 from future import standard_library
 standard_library.install_aliases()
 from builtins import str
@@ -20,9 +24,10 @@ import tempfile
 import unittest
 
 if sys.version_info >= (3, 0):
-    from io import StringIO
+    from io import StringIO, BytesIO
 else:
     from cStringIO import StringIO
+    BytesIO = StringIO
 
 # Use this hostname when you want to make sure the traffic will be
 # instantly refused.  100::/64 is a dedicated black hole.
@@ -88,7 +93,7 @@ class VersionChecker(object):
             # Python 2 writes version info on stderr.
             self.assertEqual(out.getvalue(), '')
             v = err.getvalue()
-        self.assertRegex(v, r"[0-9]+\.[0-9]+\.[0-9]+$\n")
+        self.assertRegex(v, r"[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+)?$\n")
 
 
 class FakeCurl(object):