Skip to content

Commit f9db6ef

Browse files
author
Jon Wayne Parrott
committed
Skipping mysql tests if mysql is not locally available.
1 parent 640109c commit f9db6ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

appengine/cloudsql/main_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
import os
1416
import re
17+
from unittest.case import SkipTest
1518

1619
import tests
1720
import webtest
@@ -22,6 +25,8 @@
2225
class TestMySQLSample(tests.AppEngineTestbedCase):
2326

2427
def setUp(self):
28+
if not os.path.exists('/var/run/mysqld/mysqld.sock'):
29+
raise SkipTest('No MySQL server found.')
2530
super(TestMySQLSample, self).setUp()
2631
self.app = webtest.TestApp(main.app)
2732

0 commit comments

Comments
 (0)