File tree 2 files changed +8
-3
lines changed
dotnet/Razorvine.Pyrolite
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 16
16
Also includes Pickle/Unpickle.
17
17
More info about Pyro: https://pyro4.readthedocs.io/</Description >
18
18
<Copyright >Copyright Irmen de Jong</Copyright >
19
+ <!--
20
+ <PackageLicenseExpression>MIT</PackageLicenseExpression>
21
+ <PackageLicenseFile>../LICENSE</PackageLicenseFile>
22
+ -->
19
23
<PackageLicenseUrl >https://opensource.org/licenses/MIT</PackageLicenseUrl >
20
24
<PackageProjectUrl >https://github.com/irmen/Pyrolite</PackageProjectUrl >
21
25
<RepositoryUrl >https://github.com/irmen/Pyrolite.git</RepositoryUrl >
Original file line number Diff line number Diff line change @@ -89,12 +89,13 @@ public void TestUnpickleRealProxy4() {
89
89
UnpickleRealProxy ( pickledProxy ) ;
90
90
}
91
91
92
- [ Fact ] // fails on Windows due to "\r\n" line ending
92
+ [ Fact ]
93
93
public void TestUnpickleProto0Bytes ( ) {
94
- var pickle = File . ReadAllBytes ( "pickled_bytes_level0.dat" ) ;
94
+ // note: convert \r\n that may be inserted in the data file on windows, back to \n that pickle expects
95
+ var pickle = File . ReadAllText ( "pickled_bytes_level0.dat" ) . Replace ( "\r \n " , "\n " ) ;
95
96
96
97
PickleSerializer ser = new PickleSerializer ( ) ;
97
- string x = ( string ) ser . deserializeData ( pickle ) ;
98
+ string x = ( string ) ser . deserializeData ( Encoding . UTF8 . GetBytes ( pickle ) ) ;
98
99
Assert . Equal ( 2496 , x . Length ) ;
99
100
100
101
// validate that the bytes in the string are what we expect (based on md5 hash)
You can’t perform that action at this time.
0 commit comments