|
@@ 148-168 (lines=21) @@
|
| 145 |
|
"py_files")), |
| 146 |
|
os.path.normcase(self.collectors_test_dir+os.sep)])) |
| 147 |
|
|
| 148 |
|
def test_ignored(self): |
| 149 |
|
self.assertEqual( |
| 150 |
|
sorted(i for i in |
| 151 |
|
collect_dirs([os.path.join(self.collectors_test_dir, |
| 152 |
|
"**")], |
| 153 |
|
[os.path.normcase(os.path.join( |
| 154 |
|
self.collectors_test_dir, |
| 155 |
|
"others", |
| 156 |
|
"py_files"))]) |
| 157 |
|
if "__pycache__" not in i), |
| 158 |
|
|
| 159 |
|
sorted([os.path.normcase(os.path.join( |
| 160 |
|
self.collectors_test_dir, "bears")), |
| 161 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 162 |
|
"bears_local_global")), |
| 163 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 164 |
|
"others")), |
| 165 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 166 |
|
"others", |
| 167 |
|
"c_files")), |
| 168 |
|
os.path.normcase(self.collectors_test_dir+os.sep)])) |
| 169 |
|
|
| 170 |
|
def test_collect_registered_bears_dirs(self): |
| 171 |
|
old_iter = pkg_resources.iter_entry_points |
|
@@ 128-146 (lines=19) @@
|
| 125 |
|
"py_files")), |
| 126 |
|
os.path.normcase(self.collectors_test_dir+os.sep)])) |
| 127 |
|
|
| 128 |
|
def test_dir_string_collection(self): |
| 129 |
|
self.assertEqual( |
| 130 |
|
sorted(i for i in |
| 131 |
|
collect_dirs(os.path.join(self.collectors_test_dir, |
| 132 |
|
"**")) |
| 133 |
|
if "__pycache__" not in i), |
| 134 |
|
sorted([os.path.normcase(os.path.join( |
| 135 |
|
self.collectors_test_dir, "bears")), |
| 136 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 137 |
|
"bears_local_global")), |
| 138 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 139 |
|
"others")), |
| 140 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 141 |
|
"others", |
| 142 |
|
"c_files")), |
| 143 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 144 |
|
"others", |
| 145 |
|
"py_files")), |
| 146 |
|
os.path.normcase(self.collectors_test_dir+os.sep)])) |
| 147 |
|
|
| 148 |
|
def test_ignored(self): |
| 149 |
|
self.assertEqual( |
|
@@ 108-126 (lines=19) @@
|
| 105 |
|
def test_dir_invalid(self): |
| 106 |
|
self.assertEqual(collect_dirs(["invalid_path"]), []) |
| 107 |
|
|
| 108 |
|
def test_dir_collection(self): |
| 109 |
|
self.assertEqual( |
| 110 |
|
sorted(i for i in |
| 111 |
|
collect_dirs([os.path.join(self.collectors_test_dir, |
| 112 |
|
"**")]) |
| 113 |
|
if "__pycache__" not in i), |
| 114 |
|
sorted([os.path.normcase(os.path.join( |
| 115 |
|
self.collectors_test_dir, "bears")), |
| 116 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 117 |
|
"bears_local_global")), |
| 118 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 119 |
|
"others")), |
| 120 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 121 |
|
"others", |
| 122 |
|
"c_files")), |
| 123 |
|
os.path.normcase(os.path.join(self.collectors_test_dir, |
| 124 |
|
"others", |
| 125 |
|
"py_files")), |
| 126 |
|
os.path.normcase(self.collectors_test_dir+os.sep)])) |
| 127 |
|
|
| 128 |
|
def test_dir_string_collection(self): |
| 129 |
|
self.assertEqual( |