()
| 206 | |
| 207 | |
| 208 | def main(): |
| 209 | import os |
| 210 | import sys |
| 211 | import unittest |
| 212 | from optparse import OptionParser |
| 213 | |
| 214 | global _channel |
| 215 | |
| 216 | parser = OptionParser( |
| 217 | prog="visualstudio_py_testlauncher", |
| 218 | usage="Usage: %prog [<option>] <test names>... ", |
| 219 | ) |
| 220 | parser.add_option( |
| 221 | "--debug", action="store_true", help="Whether debugging the unit tests" |
| 222 | ) |
| 223 | parser.add_option( |
| 224 | "-x", |
| 225 | "--mixed-mode", |
| 226 | action="store_true", |
| 227 | help="wait for mixed-mode debugger to attach", |
| 228 | ) |
| 229 | parser.add_option( |
| 230 | "-t", |
| 231 | "--test", |
| 232 | type="str", |
| 233 | dest="tests", |
| 234 | action="append", |
| 235 | help="specifies a test to run", |
| 236 | ) |
| 237 | parser.add_option( |
| 238 | "--testFile", type="str", help="Fully qualitified path to file name" |
| 239 | ) |
| 240 | parser.add_option( |
| 241 | "-c", "--coverage", type="str", help="enable code coverage and specify filename" |
| 242 | ) |
| 243 | parser.add_option( |
| 244 | "-r", |
| 245 | "--result-port", |
| 246 | type="int", |
| 247 | help="connect to port on localhost and send test results", |
| 248 | ) |
| 249 | parser.add_option("--us", type="str", help="Directory to start discovery") |
| 250 | parser.add_option( |
| 251 | "--up", type="str", help="Pattern to match test files (" "test*.py" " default)" |
| 252 | ) |
| 253 | parser.add_option( |
| 254 | "--ut", |
| 255 | type="str", |
| 256 | help="Top level directory of project (default to start directory)", |
| 257 | ) |
| 258 | parser.add_option( |
| 259 | "--uvInt", |
| 260 | "--verboseInt", |
| 261 | type="int", |
| 262 | help="Verbose output (0 none, 1 (no -v) simple, 2 (-v) full)", |
| 263 | ) |
| 264 | parser.add_option("--uf", "--failfast", type="str", help="Stop on first failure") |
| 265 | parser.add_option( |
no test coverage detected