Skip to content

Commit

Permalink
Merge branch 'python_check_win_msg' into 'master'
Browse files Browse the repository at this point in the history
fix(tools): fix python dependecy test on windows

Closes IDFCI-2051

See merge request espressif/esp-idf!29313
  • Loading branch information
dobairoland committed Feb 28, 2024
2 parents 4ddc947 + a6c62bd commit 88a41e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/test_idf_tools/test_idf_tools_python_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
PYTHON_DIR_BACKUP = tempfile.mkdtemp()
PYTHON_BINARY = os.path.join('Scripts', 'python.exe') if sys.platform == 'win32' else os.path.join('bin', 'python')
REQ_SATISFIED = 'Python requirements are satisfied'
REQ_MISSING = 'Package was not found and is required by the application: {}'
# Python 3.8 and 3.9 has a different error message that does not include the "No package metadata was found for" part
REQ_MISSING = r'Package was not found and is required by the application: (No package metadata was found for )?{}'
REQ_CORE = '- {}'.format(os.path.join(IDF_PATH, 'tools', 'requirements', 'requirements.core.txt'))
REQ_GDBGUI = '- {}'.format(os.path.join(IDF_PATH, 'tools', 'requirements', 'requirements.gdbgui.txt'))
CONSTR = 'Constraint file: {}'.format(os.path.join(TOOLS_DIR, 'espidf.constraints'))
Expand Down Expand Up @@ -346,7 +347,7 @@ def test_missing_requirement(self): # type: () -> None

# check-python-dependencies should fail as the package was not installed yet
output = self.run_idf_tools(['check-python-dependencies'])
self.assertIn(REQ_MISSING.format('foopackage'), output)
self.assertRegex(output, REQ_MISSING.format('foopackage'))
self.assertNotIn(REQ_SATISFIED, output)

def test_dev_version(self): # type: () -> None
Expand Down

0 comments on commit 88a41e8

Please sign in to comment.