Combine normal and okay statuses.
- Changed all normal results to ok.
- Normal results were intended for tools that produced info and
weren't expected to have problem results.
- Ultimately not worth distinguishing from tools that sometimes
show problems.
- One less color status makes the summary table simpler.
- Also changed the not-applicable status color to the lighter grey
that normal used to have.
- Made the success status non-configurable since ok status is the
only sensible status at the moment.
This commit is contained in:
parent
e6380bb1d7
commit
4197cebd1b
5 changed files with 53 additions and 85 deletions
|
|
@ -26,10 +26,9 @@
|
|||
│ x - Open the current file with xdg-open. │
|
||||
│ │
|
||||
│Statuses: │
|
||||
│ [m[38;2;255;255;255m[48;2;80;80;80m [m[38;2;255;255;255m[48;2;0;0;0m Normal │
|
||||
│ [m[38;2;255;255;255m[48;2;0;159;107m [m[38;2;255;255;255m[48;2;0;0;0m Ok │
|
||||
│ [m[38;2;255;255;255m[48;2;0;119;80m [m[38;2;255;255;255m[48;2;0;0;0m Problem │
|
||||
│ [m[38;2;255;255;255m[48;2;50;50;50m [m[38;2;255;255;255m[48;2;0;0;0m Not applicable │
|
||||
│ [m[38;2;255;255;255m[48;2;80;80;80m [m[38;2;255;255;255m[48;2;0;0;0m Not applicable │
|
||||
│ [m[38;2;255;255;255m[48;2;0;135;189m [m[38;2;255;255;255m[48;2;0;0;0m Running │
|
||||
│ [m[38;2;255;255;255m[48;2;200;0;200m [m[38;2;255;255;255m[48;2;0;0;0m Timed out │
|
||||
│ [m[38;2;100;100;100m[48;2;0;0;0m.[m[38;2;255;255;255m[48;2;0;0;0m Pending │
|
||||
|
|
@ -56,5 +55,6 @@
|
|||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
[m[38;2;255;255;255m[48;2;76;76;76m [m[38;2;76;255;76m[48;2;76;76;76mh[m[38;2;255;255;255m[48;2;76;76;76melp [m[38;2;76;255;76m[48;2;76;76;76mq[m[38;2;255;255;255m[48;2;76;76;76muit [m[38;2;76;255;76m[48;2;76;76;76mtab[m[38;2;255;255;255m[48;2;76;76;76m:focus [m[38;2;76;255;76m[48;2;76;76;76mo[m[38;2;255;255;255m[48;2;76;76;76mrient [m[38;2;76;255;76m[48;2;76;76;76ml[m[38;2;255;255;255m[48;2;76;76;76mog [m[38;2;76;255;76m[48;2;76;76;76me[m[38;2;255;255;255m[48;2;76;76;76mdit [m[38;2;76;255;76m[48;2;76;76;76mn[m[38;2;255;255;255m[48;2;76;76;76mext [m[38;2;76;255;76m[48;2;76;76;76ms[m[38;2;255;255;255m[48;2;76;76;76mort [m[38;2;76;255;76m[48;2;76;76;76mr[m[38;2;255;255;255m[48;2;76;76;76mefresh [m[38;2;76;255;76m[48;2;76;76;76mf[m[38;2;255;255;255m[48;2;76;76;76mullscreen [m[38;2;76;255;76m[48;2;76;76;76mx[m[38;2;255;255;255m[48;2;76;76;76mdg-open [m
|
||||
|
|
@ -76,10 +76,10 @@ class ToolsTestCase(unittest.TestCase):
|
|||
with unittest.mock.patch.object(tools.pwd, "getpwuid",
|
||||
return_value=mock_pw_entry):
|
||||
self._test_tool(tools.metadata,
|
||||
[("hi3.py", tools.Status.normal)])
|
||||
[("hi3.py", tools.Status.ok)])
|
||||
|
||||
def test_contents(self):
|
||||
self._test_tool(tools.contents, [("hi3.py", tools.Status.normal)])
|
||||
self._test_tool(tools.contents, [("hi3.py", tools.Status.ok)])
|
||||
|
||||
HI_OK = [("hi3.py", tools.Status.ok)]
|
||||
|
||||
|
|
@ -94,12 +94,12 @@ class ToolsTestCase(unittest.TestCase):
|
|||
# ("hi3_test.py", tools.Status.ok),
|
||||
# ("test_foo.py", tools.Status.ok)])
|
||||
|
||||
HI_NORMAL = [("hi3.py", tools.Status.normal)]
|
||||
HI_OK = [("hi3.py", tools.Status.ok)]
|
||||
|
||||
def test_pydoc(self):
|
||||
# FIX: This is failing inside AppImages.
|
||||
if "APPDIR" not in os.environ:
|
||||
self._test_tool(tools.pydoc, self.HI_NORMAL)
|
||||
self._test_tool(tools.pydoc, self.HI_OK)
|
||||
|
||||
def test_mypy(self):
|
||||
self._test_tool(tools.mypy, self.HI_OK)
|
||||
|
|
@ -114,10 +114,10 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._test_tool(tools.pylint, self.HI_OK)
|
||||
|
||||
def test_python_gut(self):
|
||||
self._test_tool(tools.python_gut, self.HI_NORMAL)
|
||||
self._test_tool(tools.python_gut, self.HI_OK)
|
||||
|
||||
def test_python_modulefinder(self):
|
||||
self._test_tool(tools.python_modulefinder, self.HI_NORMAL)
|
||||
self._test_tool(tools.python_modulefinder, self.HI_OK)
|
||||
|
||||
def test_python_mccabe(self):
|
||||
self._test_tool(tools.python_mccabe, self.HI_OK)
|
||||
|
|
@ -125,7 +125,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
# FIX: Make the golden-file deterministic
|
||||
# def test_pydisasm(self):
|
||||
# self._test_tool(tools.pydisasm,
|
||||
# [("hi3.cpython-34.pyc", tools.Status.normal)])
|
||||
# [("hi3.cpython-34.pyc", tools.Status.ok)])
|
||||
|
||||
def test_perl_syntax(self):
|
||||
self._test_tool(tools.perl_syntax,
|
||||
|
|
@ -134,7 +134,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
])
|
||||
|
||||
# def test_perltidy(self):
|
||||
# self._test_tool(tools.perltidy, [("perl.pl", tools.Status.normal)])
|
||||
# self._test_tool(tools.perltidy, [("perl.pl", tools.Status.ok)])
|
||||
|
||||
# def test_perl6_syntax(self):
|
||||
# self._test_tool(tools.perl6_syntax,
|
||||
|
|
@ -145,37 +145,37 @@ class ToolsTestCase(unittest.TestCase):
|
|||
|
||||
def test_objdump_headers(self):
|
||||
self._test_tool(tools.objdump_headers,
|
||||
[("Mcrt1.o", tools.Status.normal)])
|
||||
[("Mcrt1.o", tools.Status.ok)])
|
||||
|
||||
def test_objdump_disassemble(self):
|
||||
self._test_tool(tools.objdump_disassemble,
|
||||
[("Mcrt1.o", tools.Status.problem)])
|
||||
|
||||
def test_readelf(self):
|
||||
self._test_tool(tools.readelf, [("Mcrt1.o", tools.Status.normal)])
|
||||
self._test_tool(tools.readelf, [("Mcrt1.o", tools.Status.ok)])
|
||||
|
||||
def test_zipinfo(self):
|
||||
self._test_tool(tools.zipinfo, [("hi.zip", tools.Status.normal)])
|
||||
self._test_tool(tools.zipinfo, [("hi.zip", tools.Status.ok)])
|
||||
|
||||
def test_tar_gz(self):
|
||||
self._test_tool(tools.tar_gz, [("hi.tar.gz", tools.Status.normal),
|
||||
("hi.tgz", tools.Status.normal)])
|
||||
self._test_tool(tools.tar_gz, [("hi.tar.gz", tools.Status.ok),
|
||||
("hi.tgz", tools.Status.ok)])
|
||||
|
||||
def test_tar_bz2(self):
|
||||
self._test_tool(tools.tar_bz2, [("hi.tar.bz2", tools.Status.normal)])
|
||||
self._test_tool(tools.tar_bz2, [("hi.tar.bz2", tools.Status.ok)])
|
||||
|
||||
def test_nm(self):
|
||||
self._test_tool(tools.nm, [("libieee.a", tools.Status.normal),
|
||||
("libpcprofile.so", tools.Status.normal)])
|
||||
self._test_tool(tools.nm, [("libieee.a", tools.Status.ok),
|
||||
("libpcprofile.so", tools.Status.ok)])
|
||||
|
||||
def test_pdf2txt(self):
|
||||
self._test_tool(tools.pdf2txt, [("standard.pdf", tools.Status.normal)])
|
||||
self._test_tool(tools.pdf2txt, [("standard.pdf", tools.Status.ok)])
|
||||
|
||||
def test_html_syntax(self):
|
||||
self._test_tool(tools.html_syntax, [("hi.html", tools.Status.problem)])
|
||||
|
||||
def test_html2text(self):
|
||||
self._test_tool(tools.html2text, [("hi.html", tools.Status.normal)])
|
||||
self._test_tool(tools.html2text, [("hi.html", tools.Status.ok)])
|
||||
|
||||
def test_cpp_syntax_gcc(self):
|
||||
self._test_tool(tools.cpp_syntax_gcc, [("hello.cpp", tools.Status.ok)])
|
||||
|
|
@ -186,7 +186,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
def test_pil(self):
|
||||
for extension in ["png", "jpg", "gif", "bmp", "ppm", "tiff", "tga"]:
|
||||
self._test_tool(tools.pil, [("circle." + extension,
|
||||
tools.Status.normal)])
|
||||
tools.Status.ok)])
|
||||
|
||||
|
||||
class LruCacheWithEvictionTestCase(unittest.TestCase):
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class WorkerTestCase(unittest.TestCase):
|
|||
worker_.process.stdin.write(f"{compression}\n".encode("utf-8"))
|
||||
future = worker_.run_tool("foo", tools.metadata)
|
||||
status = loop.run_until_complete(future)
|
||||
self.assertEqual(status, tools.Status.normal)
|
||||
self.assertEqual(status, tools.Status.ok)
|
||||
result_path = os.path.join(tools.CACHE_PATH, "foo-metadata")
|
||||
self.assertTrue(os.path.exists(result_path))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue