def test_inspect_code(self):
     fold = os.path.abspath(os.path.dirname(__file__))
     exp = 'import ([a-zA-Z0-9_]+)'
     st = TempBuffer()
     main(args=['inspect_source_code', '-f',
                fold, '-l', exp], fLOG=st.fprint)
     res = str(st)
     self.assertStartsWith("group,line,name,patid", res)
 def test_inspect_code(self):
     fold = os.path.abspath(os.path.dirname(__file__))
     exp = 'import ([a-zA-Z0-9_]+)'
     st = TempBuffer()
     main(args=['inspect_source_code', '-f',
                fold, '-l', exp], fLOG=st.fprint)
     res = str(st)
     self.assertStartsWith("group,line,name,patid", res)
 def test_inspect_help(self):
     st = TempBuffer()
     main(args="inspect_source_code --help".split(), fLOG=st.fprint)
     res = str(st)
     self.assertIn("usage: inspect_source_code", res)
 def test_inspect(self):
     st = TempBuffer()
     main(args=[], fLOG=st.fprint)
     res = str(st)
     self.assertIn("python -m ensae_teaching_cs <command>", res)
     self.assertIn("Counts groups extracted", res)
 def test_inspect_help(self):
     st = TempBuffer()
     main(args="inspect_source_code --help".split(), fLOG=st.fprint)
     res = str(st)
     self.assertIn("Counts groups extracted", res)
 def test_inspect_help(self):
     st = TempBuffer()
     main(args="inspect_source_code --help".split(), fLOG=st.fprint)
     res = str(st)
     self.assertIn("Counts groups extracted", res)
 def test_inspect(self):
     st = TempBuffer()
     main(args=[], fLOG=st.fprint)
     res = str(st)
     self.assertIn("python -m ensae_teaching_cs <command>", res)
     self.assertIn("Counts groups extracted", res)