Commit Graph

20 Commits (41d02f944ffd26f438a0efd90156c14fc2397939)

Author SHA1 Message Date
Raphaël Vinot d0f7d1bf81 new: Add typing everywhere, use pathlib when possible 2020-01-13 17:37:19 +01:00
Dan Puttick 7b275c7e6f Rename bin/ to filecheck/ 2017-08-10 18:12:30 -04:00
Dan Puttick c1d3457562 Move writing to log from File to Groomer 2017-07-27 17:06:23 -04:00
Dan Puttick fe82a5ac0d Change rest of lists in Config to tuples 2017-07-20 18:40:16 -04:00
Dan Puttick fabc2cf7c4 Move Travis-only test files to uncategorized 2017-07-14 22:03:56 -04:00
Dan Puttick 41abe7e5d6 Prevent following arbitrarily nested symlinks 2017-07-14 17:52:21 -04:00
Dan Puttick 14b9d71da8 Mock out GroomerLogger in test_filecheck 2017-07-13 17:00:41 -04:00
Dan Puttick e19064c83f Refactor FileBase to store props as attributes
* This is kind of a big refactoring - I realized that storing file
props in a dict was causing some subtle problems, and that just having
them as attributes makes things a lot more simple
* I considered making a separate FileProps object and nesting it
inside FileBase, but almost all FileBase methods concern manipulating
file props, so it didn't really make sense.
* Tests are almost passing with this commit, but need a few more changes
and fixes for full test coverage + all passing.
2017-07-12 17:58:39 -04:00
Dan Puttick fed4f75cd7 Filecheck tests work with file catalog 2017-07-07 16:09:06 -04:00
Dan Puttick e977966480 Reorganize filecheck tests
* Move all SampleFile code into test_filecheck.py
* Make a stub for logging tests in test_filecheck_logging.py
2017-07-07 16:02:20 -04:00
Dan Puttick 871eea7a68 Working version of file-by-file testing 2017-07-06 15:41:38 -04:00
Dan Puttick 3f9be48cbd Initial version of individual file test harness
* Parametrized test for normal and dangerous files
* Still needs a way to handle "complex" files (ones that require a full groomer
due to having temporary folders), as well as a way to read .expect test description
files
2017-07-05 18:09:10 -04:00
Dan Puttick e88ec8a474 Rename src_valid and src_invalid
* In preparation for having source files be a submodule instead of bundled with PyCIRCLean
* First, going to get the tests running with the new set of files
* Then, going to make the tests run file by file instead of on the whole directory
* Also, need to rewrite the KittenGroomer tests to mock the libmagic methods
2017-06-30 15:25:53 -04:00
Dan Puttick 3e56787686 Update tests for new logger 2017-04-10 13:22:36 +02:00
Dan Puttick ac94cf5d6d Change the way test dst dirs are handled
* Each test folder now copies files into its own test directory
* Change gitignore due to dst dir changes
* Make sure logger.tree is called for every directory
2017-03-15 22:56:00 -04:00
Dan Puttick 0038d3ef66 Switch to using file properties
* make_dangerous now takes a description string
* add_file_string takes strings describing the file
2017-03-15 21:06:07 -04:00
Dan Puttick c6ecc5e3a3 Fix process_dir bug in filecheck tests 2017-03-15 21:04:57 -04:00
Dan Puttick 61aa14c98d Change _write_log to _print_log 2017-03-15 21:04:57 -04:00
Dan Puttick 3dad4faa61 Reorganize tests making them easier to run
- The tests now automatically run depending on whether you have the dependencies
installed, instead of failing and throwing exceptions.
- CONTRIBUTING.md has more information on how to run the tests.
- When the tests run, they will save their logs to /test_logs instead
of printing them so you can read them later.
- Change names of source file directories to make them more descriptive
2017-01-18 15:51:54 -05:00
Dan Puttick 35501b69af Create test_filecheck.py 2017-01-18 15:51:47 -05:00