

This will run pytest using the installed version of python.Īlternatively, you can use the command pipenv run python setup.py test. To run test, you can use the command pipenv run Install the pytest in your current pipfile.
#REDACTED FILES SMUGGLING HOW TO#
This tutorial give the best discussion of how to write tests

For questions use the message board and see the pytest There are several testing frameworks for python, for this project use the This will allow us to test if the code is working as expected. The test files test the different features of the code. The stats of all functions for all text files are printed and stderr is given when there are no words redacted in that file for that particular function.

Stats should help you while developing your code. Be sure to describe the format of your outfile to in your README file. Some statistics to include are the types and counts of redacted terms and the statistics of each redacted file. Stats takes either the name of a file, or special files (stderr, stdout), and writes a summary of the redaction process. For example, if the given concept word is prison, a sentence (or paragraph) either containing the word or similar concepts, such as jail or incarcerated, that whole sentence should be redacted. Any section of the input files that refer to this concept should be redacted. This flag, which can be repeated one or more times, takes one word or phrase that represents a concept. Then the sentences with these words are redacted. All the words from all synsets are lammetized and saved into list. The similar words are found using wordnet from nltk. This concept word is given by the user and we need to redact the sentences containing that concept words. The concept() function takes the data and concept word as the input.
