From ee2a1b4f4d025653861c6a285c12c2b55a2d0746 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 30 Jan 2018 19:13:14 -0200 Subject: [PATCH] Add an explicit test for backward compatibility with "config.slaveinput" Related to #234 --- testing/acceptance_test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 5c71466..56ecc0b 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -192,6 +192,20 @@ class TestDistribution: ]) assert dest.join(subdir.basename).check(dir=1) + def test_backward_compatibility_worker_terminology(self, testdir): + """Ensure that we still support "config.slaveinput" for backward compatibility (#234). + + Keep in mind that removing this compatibility will break a ton of plugins and user code. + """ + testdir.makepyfile(""" + def test(pytestconfig): + assert hasattr(pytestconfig, 'slaveinput') + assert hasattr(pytestconfig, 'workerinput') + """) + result = testdir.runpytest("-n1") + result.stdout.fnmatch_lines("*1 passed*") + assert result.ret == 0 + def test_data_exchange(self, testdir): testdir.makeconftest(""" # This hook only called on master.