From 6038ec21ca5264466bdd32dd42dd014b5fd934e4 Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Thu, 25 Apr 2013 17:45:42 -0700 Subject: [PATCH] Added test to catch import failure in distributed mode. --- testing/acceptance_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index f38e772..c103173 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -24,6 +24,18 @@ class TestDistribution: "*1 failed*", ]) + def test_n1_import_error(self, testdir): + p1 = testdir.makepyfile(""" + import __import_of_missing_module + def test_import(): + pass + """) + result = testdir.runpytest(p1, "-n1") + assert result.ret == 1 + result.stdout.fnmatch_lines([ + "*1 failed*", + ]) + def test_n1_skip(self, testdir): p1 = testdir.makepyfile(""" def test_skip():