Skip to content

Commit

Permalink
Improve stability of alphabetical sort test, update AttrDict version
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonscript committed Mar 27, 2021
1 parent c355986 commit 6f77cf9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ However, since we're putting a lot of faith in machines and automation, there ar
- `no-console` will completely suppress console output. If you wanted that, for some reason.
- `plaintext` will output to the console without pretty formatting. You'll want to use this option with SABnzbd.

#### Testing
If you'd like to run this automatically with some specific options, you can create a new file (e.g., `post-script.py`) and do:

import subprocess
subprocess.call(["python3", "/path/to/fylm/fylm", "-s", "/Volumes/Downloads", "--plaintext"])

### Testing

Tests are run using `pytest`. To install:

Expand All @@ -109,16 +114,16 @@ To run tests:
cd fylm/
python -m pytest -xq (--no-print-logs)

#### Contributing
### Contributing

Contributions are welcome! Please send in a PR with a clear explanation of what you're adding and why, and where applicable, add tests (a new test class, even!) to validate. Please read our code of conduct before contributing.

#### Credits
### Credits

Murcury icon by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com/).

Special thanks to [Pyfancy()](https://github.com/ilovecode1/Pyfancy-2) and [colors](https://github.com/jonathaneunice/colors/).

#### License
### License

Fylm is licensed under both the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) license and the [Hippocratic License](https://firstdonoharm.dev/version/2/1/license.html) license. Were a conflict or dispute to occur between these two licenses, the **Hippocratic License** license shall take precedence. Under its princples of Do No Harm, no portion of this software may be used to (or be a part of software that can be used to) cause, infer, encourage, incite, or otherwise lead to physical or verbal harm for any person or people, _especially_ marginalized and underrepresented people.
5 changes: 2 additions & 3 deletions fylm/tests/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ def test_get_new_films_multiple_dirs(self):
assert(len(valid_films) == len(conftest.expected) + 2)

# Assert that the list is sorted alphabetically
# assert([x.title for x in all_films] == [x.title for x in sorted(all_films, key=lambda x: x.title)])
assert(all_films[4].title == 'Alita Battle Angel 2019')
assert(all_films[5].title == 'All the Money In the World')
assert(all(valid_films[i].title <= valid_films[i+1].title
for i in range(len(valid_films)-1)))

def test_get_valid_files(self):

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
future>=0.16.0
pyyaml>=4.2b4
ansicolors>=1.1.8
attrdict>=2.0.0
git+git://github.com/brandonscript/AttrDict
requests-cache>=0.4.13
tmdbsimple>=2.1.0
PlexAPI
Expand Down

0 comments on commit 6f77cf9

Please sign in to comment.