PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

VS2022 Pytest + pytest-xdist unicode params issue

Open Full-Hole opened this issue 2 years ago β€’ 0 comments

Describe the bug Test execution from VS2022 will be skipped if test contains unicode symbols in params like 😎 or αΊ„, with pytest launched with argument -n/--numprocesses (pytest-xdist)

Steps to Reproduce

  1. Create pytest test with params containing unicode symbols
  2. create pytest.ini with [pytest] addopts = -n auto
  3. Run test from VS2022

Expected behavior Test group executed successfully

Additional context and screenshots When start test group image When run test separately image Test without pytesx-xdist image Tests without VS image

Sample Code

    @pytest.mark.parametrize('filter', ['αΊ„', 'somedata', 'πŸ˜‚'])   
    def test_cant_get_templates(self, filter):
        response = self.some_api_get_with_response_code(filter=filter)
        with assert_all('Asserts test_negative_templates_id'):
            check_equal(ServiceCode.OK, response.code, f'Return Not {ServiceCode.OK} responce code')
            check_equal(CommonConst.EXPECTED_TEMPLATES, response.body,
                        f'Expected template_id: {CommonConst.EXPECTED_TEMPLATES} '
                        f'not in response {response.body}')

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: VisualStudio.17.Release/17.3.0+32804.467 PTVS version: 17.0.22179.3 Python version: 3.10

Full-Hole avatar Aug 19 '22 11:08 Full-Hole