-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: azdev test cannot find core tests (#148)
- Loading branch information
Jianhui Harold
authored
Jan 3, 2020
1 parent
15bfa11
commit 13df704
Showing
5 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# ----------------------------------------------------------------------------- | ||
|
||
|
||
import unittest | ||
import os | ||
|
||
from azdev.utilities import get_path_table | ||
|
||
|
||
class TestGetPathTable(unittest.TestCase): | ||
def setUp(self): | ||
self.path_table = get_path_table() | ||
|
||
def test_component(self): | ||
self.assertTrue('core' in self.path_table) | ||
self.assertTrue('ext' in self.path_table) | ||
self.assertTrue('mod' in self.path_table) | ||
|
||
def test_core_modules_directory_exist(self): | ||
if 'core' not in self.path_table: | ||
self.skipTest("No 'core' key in what get_path_table() return") | ||
|
||
core_modules = self.path_table['core'] | ||
for _, mod_path in core_modules.items(): | ||
self.assertTrue(os.path.isdir(mod_path)) | ||
|
||
def test_command_modules_directory_exist(self): | ||
if 'mod' not in self.path_table: | ||
self.skipTest("No 'mod' key in what get_path_table() return") | ||
|
||
command_modules = self.path_table['mod'] | ||
for _, mod_path in command_modules.items(): | ||
self.assertTrue(os.path.isdir(mod_path)) | ||
|
||
def test_extension_modules_directory_exist(self): | ||
if 'ext' not in self.path_table: | ||
self.skipTest("No 'ext' key in what get_path_table() return") | ||
|
||
if not self.path_table['ext']: | ||
self.skipTest("No extension modules installed by azdev") | ||
|
||
extension_moduels = self.path_table['ext'] | ||
for _, mod_path in extension_moduels.items(): | ||
self.assertTrue(os.path.isdir(mod_path)) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters