Commit c3a1cc8 1 parent 816d114 commit c3a1cc8 Copy full SHA for c3a1cc8
File tree 5 files changed +39
-8
lines changed
5 files changed +39
-8
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ jobs:
116
116
run : |
117
117
pip install -r requirements.txt
118
118
pip install -U pytest==${{ matrix.pytest-version }}
119
- pip install opentimelineio undefined pandas parquet pyarrow
119
+ pip install opentimelineio pandas parquet pyarrow
120
120
pip install -e .
121
121
if [[ '${{ matrix.pytest-version }}' == '4.0.2' ]]; then
122
122
pip install -U attrs==19.1.0
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ The released versions correspond to PyPI releases.
9
9
* removed the argument `module_cleanup_mode`, that was introduced as a temporary workaround
10
10
in the previous version - related problems shall be handled using a cleanup handler
11
11
12
+ ### Enhancements
13
+ * added support for `O_NOFOLLOW` and `O_DIRECTORY` flags in `os.open`
14
+ (see [#972](../../issues/972) and [#974](../../issues/974))
15
+
12
16
### Fixes
13
17
* fixed a specific problem on reloading a pandas-related module (see [#947](../../issues/947)),
14
18
added possibility for unload hooks for specific modules
@@ -26,9 +30,10 @@ The released versions correspond to PyPI releases.
26
30
* fixed permission problem with `shutil.rmtree` if emulating Windows under POSIX
27
31
(see [#979](../../issues/979))
28
32
29
- ### Enhancements
30
- * added support for `O_NOFOLLOW` and `O_DIRECTORY` flags in `os.open`
31
- (see [#972](../../issues/972) and [#974](../../issues/974))
33
+ ### Infrastructure
34
+ * replace `undefined` by own minimal implementation to avoid importing it
35
+ (see [#981](../../discussions/981))
36
+
32
37
33
38
## [Version 5.3.5](https://pypi.python.org/pypi/pyfakefs/5.3.5) (2024-01-30)
34
39
Fixes a regression.
Original file line number Diff line number Diff line change 13
13
# Example for a test using a custom pytest fixture with an argument to Patcher
14
14
15
15
import pytest
16
- import undefined
17
16
18
17
import pyfakefs .pytest_tests .example as example
19
18
from pyfakefs .fake_filesystem_unittest import Patcher
19
+ from pyfakefs .pytest_tests import unhashable
20
20
21
21
22
22
@pytest .mark .xfail
@@ -42,10 +42,9 @@ def test_example_file_passing_using_patcher():
42
42
check_that_example_file_is_in_fake_fs ()
43
43
44
44
45
- def test_undefined (fs ):
45
+ def test_unhashable (fs ):
46
46
# regression test for #923
47
- with pytest .raises (NotImplementedError ):
48
- print (undefined )
47
+ print (unhashable )
49
48
50
49
51
50
def check_that_example_file_is_in_fake_fs ():
Original file line number Diff line number Diff line change 5
5
from pathlib import Path
6
6
7
7
import pandas as pd
8
+ import pytest
8
9
10
+ try :
11
+ import parquet
12
+ except ImportError :
13
+ parquet = None
9
14
15
+
16
+ @pytest .mark .skipif (parquet is None , reason = "parquet not installed" )
10
17
def test_1 (fs ):
11
18
dir_ = Path (__file__ ).parent / "data"
12
19
fs .add_real_directory (dir_ )
13
20
pd .read_parquet (dir_ / "test.parquet" )
14
21
15
22
23
+ @pytest .mark .skipif (parquet is None , reason = "parquet not installed" )
16
24
def test_2 ():
17
25
dir_ = Path (__file__ ).parent / "data"
18
26
pd .read_parquet (dir_ / "test.parquet" )
Original file line number Diff line number Diff line change
1
+ import sys
2
+ import types
3
+
4
+
5
+ class Unhashable (types .ModuleType ):
6
+ """
7
+ Unhashable module, used for regression test for #923.
8
+ """
9
+
10
+ @property
11
+ def Unhashable (self ):
12
+ return self
13
+
14
+ def __eq__ (self , other ):
15
+ raise NotImplementedError ("Cannot compare unhashable" )
16
+
17
+
18
+ if sys .modules [__name__ ] is not Unhashable :
19
+ sys .modules [__name__ ] = Unhashable ("unhashable" )
You can’t perform that action at this time.
0 commit comments