Skip to content

Commit

Permalink
Replace TestCase method aliases removed in Python 3.12
Browse files Browse the repository at this point in the history
Fixes: #568
  • Loading branch information
hrnciar committed Mar 24, 2023
1 parent 8ed9dc4 commit f6f260f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
([#535](https://github.com/PyFilesystem/pyfilesystem2/issues/535)).
- Fixed a bug where files could be truncated or deleted when moved / copied onto itself.
Closes [#546](https://github.com/PyFilesystem/pyfilesystem2/issues/546)
- TestCase method aliases removed in Python 3.12 were replaced and now work with all Python versions.
Closes [#568](https://github.com/PyFilesystem/pyfilesystem2/issues/568)

## [2.4.16] - 2022-05-02

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Many thanks to the following developers for contributing to this project:
- [@sqwishy](https://github.com/sqwishy)
- [Sven Schliesing](https://github.com/muffl0n)
- [Thomas Feldmann](https://github.com/tfeldmann)
- [Tomáš Hrnčiar](https://github.com/hrnciar)
- [Tim Gates](https://github.com/timgates42/)
- [@tkossak](https://github.com/tkossak)
- [Todd Levi](https://github.com/televi)
Expand Down
2 changes: 1 addition & 1 deletion fs/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ def test_remove(self):
self.fs.makedirs("foo/bar/baz/")

error_msg = "resource 'foo/bar/egg/test.txt' not found"
assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegexp)
assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegex)
with assertRaisesRegex(errors.ResourceNotFound, error_msg):
self.fs.remove("foo/bar/egg/test.txt")

Expand Down

0 comments on commit f6f260f

Please sign in to comment.