| 235 | print "pattern.es.tag()" |
| 236 | |
| 237 | def test_command_line(self): |
| 238 | # Assert parsed output from the command-line (example from the documentation). |
| 239 | p = ["python", "-m", "pattern.es", "-s", "El gato negro.", "-OTCRL"] |
| 240 | p = subprocess.Popen(p, stdout=subprocess.PIPE) |
| 241 | p.wait() |
| 242 | v = p.stdout.read() |
| 243 | v = v.strip() |
| 244 | self.assertEqual(v, "El/DT/B-NP/O/O/el gato/NN/I-NP/O/O/gato negro/JJ/I-NP/O/O/negro ././O/O/O/.") |
| 245 | print "python -m pattern.es" |
| 246 | |
| 247 | #--------------------------------------------------------------------------------------------------- |
| 248 | |